修改后处理上传验证

This commit is contained in:
2024-09-10 13:29:37 +08:00
parent 360bcd6bfe
commit 08edc735e9
9 changed files with 115 additions and 13 deletions
@@ -0,0 +1,10 @@
#参考学习文档
https://www.cnblogs.com/cqpanda/p/16815263.html
# 如果不想指定项目名称,需要进入项目目录 一般pwershell进入的是项目根目录,需要命令指定项目
cd .\IRaCIS.Core.Test
# 该目录下如果有多个上下文,需要手动指定
dotnet ef migrations add Initial -p IRaCIS.Core.Test -c IRCContext -o CodeFirstTest/MSSQL/Migrations
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using IRaCIS.Core.Test.CodeFirstTest.MSSQL;
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL;
public partial class IRCContext : DbContext
{
public IRCContext()
{
}
public IRCContext(DbContextOptions<IRCContext> options)
: base(options)
{
}
public virtual DbSet<TrialImageDownload> TrialImageDownload { 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");
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
@@ -0,0 +1,39 @@
using IRaCIS.Core.Domain.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
{
[Table("TrialImageDownload")]
public class TrialImageDownload : BaseFullAuditEntity
{
public Guid SubjectVisitId { get; set; }
public bool IsSuccess { get; set; }
public DateTime DownloadStartTime { get; set; }
public DateTime? DownloadEndTime { get; set; }
public ImageType ImageType { get; set; }
public int ImageCount { get; set; }
public long ImageSize { get; set; }
}
public enum ImageType
{
Dicom = 1,
NoneDIcom = 2
};
public class TestNew: BaseFullAuditEntity
{
public string TestName { get; set; }
}
}