添加默认值

Test_IRC_Net8
he 2025-06-24 11:27:10 +08:00
parent b44c92f291
commit fea55de838
9 changed files with 19958 additions and 9 deletions

View File

@ -7149,6 +7149,11 @@
自定义计算问题
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.DefaultValue">
<summary>
默认值
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionQueryBase">
<summary>
查询临床数据基类
@ -7284,6 +7289,11 @@
关联Value
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalTableQuestionBase.DefaultValue">
<summary>
默认值
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.TrialClinicalTableQuestionDto">
<summary>
项目临床数据问题

View File

@ -276,6 +276,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public string CalculateQuestions { get; set; } = "[]";
/// <summary>
/// 默认值
/// </summary>
public string DefaultValue { get; set; } = string.Empty;
[NotMapped]
public List<CalculateInfo> CalculateQuestionList
{
@ -474,6 +480,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
}
}
/// <summary>
/// 默认值
/// </summary>
public string DefaultValue { get; set; } = string.Empty;
public List<string> RelevanceValueList { get; set; } = new List<string>();
}

View File

@ -100,4 +100,7 @@ public class SystemClinicalQuestion : BaseAddAuditEntity
[Comment("自定义计算问题")]
[MaxLength]
public string CalculateQuestions { get; set; } = "[]";
[Comment("默认值")]
public string DefaultValue { get; set; } = string.Empty;
}

View File

@ -72,4 +72,7 @@ public class SystemClinicalTableQuestion : BaseAddAuditEntity
[Comment("关联Value")]
public string RelevanceValue { get; set; } = string.Empty;
[Comment("默认值")]
public string DefaultValue { get; set; } = string.Empty;
}

View File

@ -106,4 +106,7 @@ public class TrialClinicalQuestion : BaseAddAuditEntity
[Comment("单位")]
public string Unit { get; set; } = string.Empty;
[Comment("默认值")]
public string DefaultValue { get; set; } = string.Empty;
}

View File

@ -84,4 +84,7 @@ public class TrialClinicalTableQuestion : BaseAddAuditEntity
[Comment("关联Value")]
public string RelevanceValue { get; set; } = string.Empty;
[Comment("默认值")]
public string DefaultValue { get; set; } = string.Empty;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,114 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class defaultvalue : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "DefaultValue",
table: "TrialClinicalTableQuestion",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "",
comment: "默认值");
migrationBuilder.AddColumn<string>(
name: "DefaultValue",
table: "TrialClinicalQuestion",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "",
comment: "默认值");
migrationBuilder.AddColumn<string>(
name: "DefaultValue",
table: "SystemClinicalTableQuestion",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "",
comment: "默认值");
migrationBuilder.AddColumn<string>(
name: "DefaultValue",
table: "SystemClinicalQuestion",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "",
comment: "默认值");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ReadingTaskQuestionMark_ReadingQuestionTrial_QuestionId",
table: "ReadingTaskQuestionMark");
migrationBuilder.DropColumn(
name: "DefaultValue",
table: "TrialClinicalTableQuestion");
migrationBuilder.DropColumn(
name: "DefaultValue",
table: "TrialClinicalQuestion");
migrationBuilder.DropColumn(
name: "DefaultValue",
table: "SystemClinicalTableQuestion");
migrationBuilder.DropColumn(
name: "DefaultValue",
table: "SystemClinicalQuestion");
migrationBuilder.AlterColumn<Guid>(
name: "TrialReadingCriterionId",
table: "TrialEmailNoticeConfig",
type: "uniqueidentifier",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true,
oldComment: "下次版本删除");
migrationBuilder.AlterColumn<Guid>(
name: "QuestionId",
table: "ReadingTaskQuestionMark",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true);
migrationBuilder.AddColumn<int>(
name: "CriterionTypeEnum",
table: "EmailNoticeConfig",
type: "int",
nullable: true,
comment: "标准枚举--后续废弃,这里可以选择多个标准");
migrationBuilder.AddForeignKey(
name: "FK_ReadingTaskQuestionMark_ReadingQuestionTrial_QuestionId",
table: "ReadingTaskQuestionMark",
column: "QuestionId",
principalTable: "ReadingQuestionTrial",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

View File

@ -2047,10 +2047,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<int?>("CriterionTypeEnum")
.HasColumnType("int")
.HasComment("标准枚举--后续废弃,这里可以选择多个标准");
b.Property<string>("CriterionTypeList")
.HasColumnType("nvarchar(max)")
.HasComment("邮件配置的多个标准");
@ -7318,7 +7314,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<Guid>("QuestionId")
b.Property<Guid?>("QuestionId")
.HasColumnType("uniqueidentifier");
b.Property<int?>("QuestionType")
@ -9395,6 +9391,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasColumnType("int")
.HasComment("自定义计算标记");
b.Property<string>("DefaultValue")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)")
.HasComment("默认值");
b.Property<string>("DictionaryCode")
.IsRequired()
.HasMaxLength(400)
@ -9514,6 +9516,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("DefaultValue")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)")
.HasComment("默认值");
b.Property<string>("DictionaryCode")
.IsRequired()
.HasMaxLength(400)
@ -11281,6 +11289,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasColumnType("int")
.HasComment("自定义计算标记");
b.Property<string>("DefaultValue")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)")
.HasComment("默认值");
b.Property<string>("DictionaryCode")
.IsRequired()
.HasMaxLength(400)
@ -11415,6 +11429,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("DefaultValue")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)")
.HasComment("默认值");
b.Property<string>("DictionaryCode")
.IsRequired()
.HasMaxLength(400)
@ -12016,7 +12036,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TrialReadingCriterionId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasComment("下次版本删除");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
@ -16782,9 +16803,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionTrial", "ReadingQuestionTrial")
.WithMany()
.HasForeignKey("QuestionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.HasForeignKey("QuestionId");
b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask")
.WithMany("ReadingTaskQuestionMarkList")