修改参数名错误
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-10 13:50:35 +08:00
parent ca9ce6e4c5
commit 36acbc1df8
9 changed files with 254 additions and 7 deletions
@@ -18,6 +18,8 @@ public partial class IRCContext : DbContext
public virtual DbSet<TrialImageDownload> TrialImageDownload { get; set; }
public virtual DbSet<TestNew> TestNew { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseSqlServer("Server=106.14.89.110,1433;Database=IRC_Code;User ID=sa;Password=mssql_KnTs2a;TrustServerCertificate=true");
@@ -0,0 +1,100 @@
// <auto-generated />
using System;
using IRaCIS.Core.Test.CodeFirstTest.MSSQL;
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.Test.CodeFirstTest.MSSQL.Migrations
{
[DbContext(typeof(IRCContext))]
[Migration("20240910053652_testAdd")]
partial class testAdd
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestNew", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TestName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("TestNew");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DownloadEndTime")
.HasColumnType("datetime2");
b.Property<DateTime>("DownloadStartTime")
.HasColumnType("datetime2");
b.Property<int>("ImageCount")
.HasColumnType("int");
b.Property<long>("ImageSize")
.HasColumnType("bigint");
b.Property<int>("ImageType")
.HasColumnType("int");
b.Property<bool>("IsSuccess")
.HasColumnType("bit");
b.Property<Guid>("SubjectVisitId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("TrialImageDownload");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,38 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
{
/// <inheritdoc />
public partial class testAdd : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "TestNew",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TestName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TestNew", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "TestNew");
}
}
}
@@ -0,0 +1,97 @@
// <auto-generated />
using System;
using IRaCIS.Core.Test.CodeFirstTest.MSSQL;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
{
[DbContext(typeof(IRCContext))]
partial class IRCContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestNew", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TestName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("TestNew");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DownloadEndTime")
.HasColumnType("datetime2");
b.Property<DateTime>("DownloadStartTime")
.HasColumnType("datetime2");
b.Property<int>("ImageCount")
.HasColumnType("int");
b.Property<long>("ImageSize")
.HasColumnType("bigint");
b.Property<int>("ImageType")
.HasColumnType("int");
b.Property<bool>("IsSuccess")
.HasColumnType("bit");
b.Property<Guid>("SubjectVisitId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("TrialImageDownload");
});
#pragma warning restore 612, 618
}
}
}
@@ -1,6 +1,7 @@
using IRaCIS.Core.Domain.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
@@ -34,6 +35,7 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
public class TestNew: BaseFullAuditEntity
{
[StringLength(100)]
public string TestName { get; set; }
}
}