修改后处理上传验证
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace IRaCIS.Core.Test.PGModelFolder;
|
||||
|
||||
public partial class PGContext : DbContext
|
||||
{
|
||||
public PGContext()
|
||||
{
|
||||
}
|
||||
|
||||
public PGContext(DbContextOptions<PGContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<Subject> Subjects { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
=> optionsBuilder.UseNpgsql("Host=106.14.89.110;Port=5432;Username=sa;Password=pgsql_pwd;Database=Test6_PG");
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
||||
if (base.Database.IsNpgsql())
|
||||
{
|
||||
modelBuilder.HasPostgresExtension("uuid-ossp");
|
||||
|
||||
//保证pgsql 生成的时间默认为timestamp 而不是 timestamp with time zone
|
||||
foreach (var entityType in modelBuilder.Model.GetEntityTypes())
|
||||
{
|
||||
foreach (var property in entityType.GetProperties())
|
||||
{
|
||||
if (property.ClrType == typeof(DateTime) || property.ClrType == typeof(DateTime?))
|
||||
{
|
||||
property.SetColumnType("timestamp without time zone");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Test.PGModelFolder;
|
||||
|
||||
public partial class Subject
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string LastName { get; set; }
|
||||
|
||||
public int StudyCount { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
||||
public DateTime? BirthDate { get; set; }
|
||||
|
||||
public DateTime? FirstGiveMedicineTime { get; set; }
|
||||
|
||||
public bool IsMissingImages { get; set; }
|
||||
|
||||
public string MedicalNo { get; set; }
|
||||
[MaxLength(200)]
|
||||
public string ShortName { get; set; }
|
||||
|
||||
public string Reason { get; set; }
|
||||
|
||||
public Guid? FinalSubjectVisitId { get; set; }
|
||||
|
||||
public string Height { get; set; }
|
||||
|
||||
[Comment("subject 编号")]
|
||||
[MaxLength(100)]
|
||||
public string Code { get; set; }
|
||||
|
||||
public int? Age { get; set; }
|
||||
|
||||
public string Modalities { get; set; }
|
||||
|
||||
public DateTime? SignDate { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
public string Sex { get; set; }
|
||||
|
||||
public Guid? LatestSubjectVisitId { get; set; }
|
||||
|
||||
public bool IsEnrollmentConfirm { get; set; }
|
||||
|
||||
public Guid? DeleteUserId { get; set; }
|
||||
|
||||
public string Weight { get; set; }
|
||||
|
||||
public DateTime? OutEnrollmentTime { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public string FirstName { get; set; }
|
||||
|
||||
public bool IsUrgent { get; set; }
|
||||
|
||||
public long Status { get; set; }
|
||||
|
||||
public DateTime? VisitOverTime { get; set; }
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public bool IsEnrollment { get; set; }
|
||||
|
||||
public bool IsAssignDoctorUser { get; set; }
|
||||
|
||||
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
||||
|
||||
public Guid TrialSiteId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user