From 48c9721ab4e5b48e14f5c6ea458d1550d56d21ba Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 25 Sep 2025 16:19:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E9=80=9A=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E8=AE=BE=E7=BD=AE=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 1 + IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs | 4 ++++ 2 files changed, 5 insertions(+) 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)