修改字段

IRC_NewDev
hang 2024-09-29 10:38:40 +08:00
parent 7693c72802
commit 11fa028cd4
7 changed files with 17801 additions and 11 deletions

View File

@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Contracts
/// </summary> /// </summary>
public bool IsImageReplicationAcrossTrial { get; set; } = false; public bool IsImageReplicationAcrossTrial { get; set; } = false;
[MaxLength]
public string BodyPartTypes { get; set; } = string.Empty; public string BodyPartTypes { get; set; } = string.Empty;

View File

@ -123,7 +123,7 @@ namespace IRaCIS.Core.Application.Service
public async Task<IResponseOutput> TestMasstransitMeditor([FromServices] IMediator _mediator, [FromServices] IRepository<TestLength> _testLengthRepository) public async Task<IResponseOutput> TestMasstransitMeditor([FromServices] IMediator _mediator, [FromServices] IRepository<TestLength> _testLengthRepository)
{ {
await _testLengthRepository.AddAsync(new TestLength() { Name = "zhouhang1" }); await _testLengthRepository.AddAsync(new TestLength() { Name = "xxxx" });
await _mediator.Send(new AddSubjectTriggerCommand { SubjectId = Guid.Empty }); await _mediator.Send(new AddSubjectTriggerCommand { SubjectId = Guid.Empty });

View File

@ -170,6 +170,8 @@ public partial class Trial : BaseFullDeleteAuditEntity
[Comment("跨项目复制")] [Comment("跨项目复制")]
public bool IsImageReplicationAcrossTrial { get; set; } = false; public bool IsImageReplicationAcrossTrial { get; set; } = false;
[MaxLength]
public string BodyPartTypes { get; set; } = "鼻咽部|脑部|颈部|胸部|上/下腹部|盆腔|全身|其他"; public string BodyPartTypes { get; set; } = "鼻咽部|脑部|颈部|胸部|上/下腹部|盆腔|全身|其他";
public string Modalitys { get; set; } = string.Empty; public string Modalitys { get; set; } = string.Empty;

View File

@ -13,7 +13,7 @@ public class IRaCISDBContextFactory : IDesignTimeDbContextFactory<IRaCISDBContex
public IRaCISDBContext CreateDbContext(string[] args) public IRaCISDBContext CreateDbContext(string[] args)
{ {
var optionsBuilder = new DbContextOptionsBuilder<IRaCISDBContext>(); var optionsBuilder = new DbContextOptionsBuilder<IRaCISDBContext>();
optionsBuilder.UseSqlServer("Server=106.14.89.110,1433;Database=Test_IRC_KEY;User ID=sa;Password=xc@123456;TrustServerCertificate=true", contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure()); optionsBuilder.UseSqlServer("Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true", contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure());
//迁移的时候,不生成外键 //迁移的时候,不生成外键
optionsBuilder.ReplaceService<IMigrationsSqlGenerator, NoForeignKeyMigrationsSqlGenerator>(); optionsBuilder.ReplaceService<IMigrationsSqlGenerator, NoForeignKeyMigrationsSqlGenerator>();
return new IRaCISDBContext(optionsBuilder.Options); return new IRaCISDBContext(optionsBuilder.Options);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class TrialModifyField : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "BodyPartTypes",
table: "Trial",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn<DateOnly>(
name: "EndDate",
table: "Education",
type: "date",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
migrationBuilder.AlterColumn<DateOnly>(
name: "BeginDate",
table: "Education",
type: "date",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "BodyPartTypes",
table: "Trial",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<DateTime>(
name: "EndDate",
table: "Education",
type: "datetime2",
nullable: true,
oldClrType: typeof(DateOnly),
oldType: "date",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "BeginDate",
table: "Education",
type: "datetime2",
nullable: true,
oldClrType: typeof(DateOnly),
oldType: "date",
oldNullable: true);
}
}
}

View File

@ -1654,8 +1654,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("Id") b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime?>("BeginDate") b.Property<DateOnly?>("BeginDate")
.HasColumnType("datetime2"); .HasColumnType("date");
b.Property<string>("City") b.Property<string>("City")
.IsRequired() .IsRequired()
@ -1696,8 +1696,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("DoctorId") b.Property<Guid>("DoctorId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime?>("EndDate") b.Property<DateOnly?>("EndDate")
.HasColumnType("datetime2"); .HasColumnType("date");
b.Property<string>("Major") b.Property<string>("Major")
.IsRequired() .IsRequired()
@ -3320,7 +3320,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("Id") b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime?>("BeginDate") b.Property<DateOnly?>("BeginDate")
.HasColumnType("date"); .HasColumnType("date");
b.Property<string>("City") b.Property<string>("City")
@ -3352,7 +3352,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("DoctorId") b.Property<Guid>("DoctorId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime?>("EndDate") b.Property<DateOnly?>("EndDate")
.HasColumnType("date"); .HasColumnType("date");
b.Property<string>("Hospital") b.Property<string>("Hospital")
@ -9856,8 +9856,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<string>("BodyPartTypes") b.Property<string>("BodyPartTypes")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(400)");
b.Property<Guid?>("CROId") b.Property<Guid?>("CROId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");