diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index e15868499..300cbbeee 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -541,6 +541,7 @@ namespace IRaCIS.Core.Application.Image.QA sv.CheckUserId = _userInfo.UserRoleId; sv.CheckState = CheckStateEnum.CVPassed; + sv.CheckTime = DateTime.Now; sv.ReadingStatus = ReadingStatusEnum.TaskAllocate; diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index ba0759fdd..193690a97 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.Conventions; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Newtonsoft.Json; @@ -58,6 +59,9 @@ public class IRaCISDBContext : DbContext //configurationBuilder.Conventions.Add(_ => new DecimalPrecisionConvention(18,2)); //针对字符串使用默认的长度配置为200,如果标注了StringLength 其他长度,就是标注的长度,如果标注了MaxLength 那么就是nvarcharMax configurationBuilder.Conventions.Add(_ => new DefaultStringLengthConvention(400)); + + //https://learn.microsoft.com/zh-cn/ef/core/modeling/relationships/conventions?utm_source=chatgpt.com + configurationBuilder.Conventions.Remove(typeof(ForeignKeyIndexConvention)); } protected override void OnModelCreating(ModelBuilder modelBuilder)