16 changed files with 28055 additions and 7 deletions
-
7src/Shentun.Peis.Application/Shentun.Peis.Application.csproj
-
2src/Shentun.Peis.DbMigrator/appsettings.json
-
50src/Shentun.Peis.Domain/ColumnReferenceCodes/ColumnReferenceCode.cs
-
42src/Shentun.Peis.Domain/ColumnReferenceInterfaces/ColumnReferenceInterface.cs
-
51src/Shentun.Peis.Domain/ColumnReferencePlugInses/ColumnReferencePlugIns.cs
-
45src/Shentun.Peis.Domain/ColumnReferences/ColumnReference.cs
-
37src/Shentun.Peis.EntityFrameworkCore/DbMapping/ColumnReferenceCodes/ColumnReferenceCodeDbMapping.cs
-
37src/Shentun.Peis.EntityFrameworkCore/DbMapping/ColumnReferenceInterfaces/ColumnReferenceInterfaceDbMapping.cs
-
29src/Shentun.Peis.EntityFrameworkCore/DbMapping/ColumnReferencePlugInses/ColumnReferencePlugInsDbMapping.cs
-
38src/Shentun.Peis.EntityFrameworkCore/DbMapping/ColumnReferences/ColumnReferenceDbMapping.cs
-
16src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
-
13495src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420035043_init20240420001.Designer.cs
-
35src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420035043_init20240420001.cs
-
13768src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.Designer.cs
-
136src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.cs
-
274src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
@ -0,0 +1,50 @@ |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Shentun.Peis.Models |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 字段对照本系统编码表
|
|||
/// </summary>
|
|||
[Table("column_reference_code")] |
|||
public class ColumnReferenceCode : AuditedEntity<Guid>, IHasConcurrencyStamp |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 字段对照主表ID
|
|||
/// </summary>
|
|||
[Column("column_reference_id")] |
|||
public Guid ColumnReferenceId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 本系统编码值
|
|||
/// </summary>
|
|||
[Column("code_value")] |
|||
public string CodeValue { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 过滤编码值
|
|||
/// </summary>
|
|||
[Column("filter_code_value")] |
|||
public string FilterCodeValue { get; set; } |
|||
|
|||
|
|||
[Column("concurrency_stamp")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
|
|||
[ForeignKey(nameof(ColumnReferenceId))] |
|||
public virtual ColumnReference ColumnReference { get; set; } |
|||
|
|||
public virtual ICollection<ColumnReferenceInterface> ColumnReferenceInterfaces { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Shentun.Peis.Models |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 字段对照第三方系统编码表
|
|||
/// </summary>
|
|||
[Table("column_reference_interface")] |
|||
public class ColumnReferenceInterface : AuditedEntity<Guid>, IHasConcurrencyStamp |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 字段对照本系统编码表ID
|
|||
/// </summary>
|
|||
[Column("column_reference_code_id")] |
|||
public Guid ColumnReferenceCodeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 第三方系统编码值
|
|||
/// </summary>
|
|||
[Column("interface_code_value")] |
|||
public string InterfaceCodeValue { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
[Column("concurrency_stamp")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
|
|||
[ForeignKey(nameof(ColumnReferenceCodeId))] |
|||
public virtual ColumnReferenceCode ColumnReferenceCode { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Domain.Entities; |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Shentun.Peis.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 字段对照插件表
|
|||
/// </summary>
|
|||
[Table("column_reference_plug_ins")] |
|||
public class ColumnReferencePlugIns : AuditedEntity<Guid>, IDisplayName, IHasConcurrencyStamp |
|||
{ |
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
[Column("display_name")] |
|||
[StringLength(30)] |
|||
public string DisplayName { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// Dll名称
|
|||
/// </summary>
|
|||
[Column("dll_name")] |
|||
[StringLength(50)] |
|||
public string DllName { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 配置参数
|
|||
/// </summary>
|
|||
[Column("parm_value")] |
|||
[StringLength(500)] |
|||
public string ParmValue { get; set; } |
|||
|
|||
|
|||
|
|||
[Column("concurrency_stamp")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
|
|||
public virtual ICollection<ColumnReference> ColumnReferences { get; set; } |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Domain.Entities; |
|||
using Shentun.Peis.Models; |
|||
|
|||
namespace Shentun.Peis.Models |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 字段对照主表
|
|||
/// </summary>
|
|||
[Table("column_reference")] |
|||
public class ColumnReference : AuditedEntity<Guid>, IDisplayName, IHasConcurrencyStamp |
|||
{ |
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
[Column("display_name")] |
|||
[StringLength(30)] |
|||
public string DisplayName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 插件ID
|
|||
/// </summary>
|
|||
[Column("column_reference_plug_ins_id")] |
|||
public Guid ColumnReferencePlugInsId { get; set; } |
|||
|
|||
|
|||
[Column("concurrency_stamp")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
|
|||
[ForeignKey(nameof(ColumnReferencePlugInsId))] |
|||
public virtual ColumnReferencePlugIns ColumnReferencePlugIns { get; set; } |
|||
|
|||
public virtual ICollection<ColumnReferenceCode> ColumnReferenceCodes { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Shentun.Peis.EntityFrameworkCore; |
|||
|
|||
namespace Shentun.Peis.DbMapping |
|||
{ |
|||
|
|||
internal class ColumnReferenceCodeDbMapping : IEntityTypeConfiguration<ColumnReferenceCode> |
|||
{ |
|||
public void Configure(EntityTypeBuilder<ColumnReferenceCode> entity) |
|||
{ |
|||
entity.HasComment("字段对照本系统编码表"); |
|||
entity.Property(t => t.CodeValue).HasComment("本系统编码值").IsRequired(); |
|||
entity.Property(t => t.ColumnReferenceId).HasComment("字段对照主表ID").IsRequired(); |
|||
entity.Property(t => t.FilterCodeValue).HasComment("过滤编码值"); |
|||
|
|||
entity.Property(e => e.Id) |
|||
.IsFixedLength() |
|||
.HasComment("编号").HasColumnName("id"); |
|||
|
|||
entity.HasOne(d => d.ColumnReference) |
|||
.WithMany(p => p.ColumnReferenceCodes) |
|||
.HasForeignKey(d => d.ColumnReferenceId) |
|||
.OnDelete(DeleteBehavior.ClientSetNull) |
|||
.HasConstraintName("fk_columnreferencecode_columnreference"); |
|||
|
|||
|
|||
entity.ConfigureByConvention(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Shentun.Peis.EntityFrameworkCore; |
|||
|
|||
namespace Shentun.Peis.DbMapping |
|||
{ |
|||
|
|||
internal class ColumnReferenceInterfaceDbMapping : IEntityTypeConfiguration<ColumnReferenceInterface> |
|||
{ |
|||
public void Configure(EntityTypeBuilder<ColumnReferenceInterface> entity) |
|||
{ |
|||
entity.HasComment("字段对照第三方系统编码表"); |
|||
entity.Property(t => t.InterfaceCodeValue).HasComment("第三方系统编码值").IsRequired(); |
|||
entity.Property(t => t.ColumnReferenceCodeId).HasComment("字段对照本系统编码表ID").IsRequired(); |
|||
|
|||
|
|||
entity.Property(e => e.Id) |
|||
.IsFixedLength() |
|||
.HasComment("编号").HasColumnName("id"); |
|||
|
|||
entity.HasOne(d => d.ColumnReferenceCode) |
|||
.WithMany(p => p.ColumnReferenceInterfaces) |
|||
.HasForeignKey(d => d.ColumnReferenceCodeId) |
|||
.OnDelete(DeleteBehavior.ClientSetNull) |
|||
.HasConstraintName("fk_columnreferenceinterface_columnreferencecode"); |
|||
|
|||
|
|||
entity.ConfigureByConvention(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Shentun.Peis.EntityFrameworkCore; |
|||
|
|||
namespace Shentun.Peis.DbMapping |
|||
{ |
|||
internal class ColumnReferencePlugInsDbMapping : IEntityTypeConfiguration<ColumnReferencePlugIns> |
|||
{ |
|||
public void Configure(EntityTypeBuilder<ColumnReferencePlugIns> entity) |
|||
{ |
|||
entity.HasComment("字段对照插件表"); |
|||
entity.Property(t => t.DisplayName).HasComment("名称").IsRequired(); |
|||
entity.Property(t => t.DllName).HasComment("Dll名称").IsRequired(); |
|||
entity.Property(t => t.ParmValue).HasComment("配置参数"); |
|||
|
|||
entity.Property(e => e.Id) |
|||
.IsFixedLength() |
|||
.HasComment("编号").HasColumnName("id"); |
|||
|
|||
entity.ConfigureByConvention(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Shentun.Peis.EntityFrameworkCore; |
|||
|
|||
namespace Shentun.Peis.DbMapping |
|||
{ |
|||
|
|||
|
|||
internal class ColumnReferenceDbMapping : IEntityTypeConfiguration<ColumnReference> |
|||
{ |
|||
public void Configure(EntityTypeBuilder<ColumnReference> entity) |
|||
{ |
|||
entity.HasComment("字段对照主表"); |
|||
entity.Property(t => t.DisplayName).HasComment("名称").IsRequired(); |
|||
entity.Property(t => t.ColumnReferencePlugInsId).HasComment("插件ID").IsRequired(); |
|||
|
|||
|
|||
entity.Property(e => e.Id) |
|||
.IsFixedLength() |
|||
.HasComment("编号").HasColumnName("id"); |
|||
|
|||
entity.HasOne(d => d.ColumnReferencePlugIns) |
|||
.WithMany(p => p.ColumnReferences) |
|||
.HasForeignKey(d => d.ColumnReferencePlugInsId) |
|||
.OnDelete(DeleteBehavior.ClientSetNull) |
|||
.HasConstraintName("fk_columnreference_columnreferenceplugins"); |
|||
|
|||
|
|||
entity.ConfigureByConvention(); |
|||
} |
|||
} |
|||
} |
|||
13495
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420035043_init20240420001.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,35 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Shentun.Peis.Migrations |
|||
{ |
|||
public partial class init20240420001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.RenameColumn( |
|||
name: "SampleGroupId", |
|||
table: "lis_request", |
|||
newName: "sample_group_id"); |
|||
|
|||
migrationBuilder.RenameIndex( |
|||
name: "IX_lis_request_SampleGroupId", |
|||
table: "lis_request", |
|||
newName: "IX_lis_request_sample_group_id"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.RenameColumn( |
|||
name: "sample_group_id", |
|||
table: "lis_request", |
|||
newName: "SampleGroupId"); |
|||
|
|||
migrationBuilder.RenameIndex( |
|||
name: "IX_lis_request_sample_group_id", |
|||
table: "lis_request", |
|||
newName: "IX_lis_request_SampleGroupId"); |
|||
} |
|||
} |
|||
} |
|||
13768
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,136 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Shentun.Peis.Migrations |
|||
{ |
|||
public partial class init20240420002 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "column_reference_plug_ins", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), |
|||
display_name = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false, comment: "名称"), |
|||
dll_name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "Dll名称"), |
|||
parm_value = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true, comment: "配置参数"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_column_reference_plug_ins", x => x.id); |
|||
}, |
|||
comment: "字段对照插件表"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "column_reference", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), |
|||
display_name = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: false, comment: "名称"), |
|||
column_reference_plug_ins_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "插件ID"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_column_reference", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_columnreference_columnreferenceplugins", |
|||
column: x => x.column_reference_plug_ins_id, |
|||
principalTable: "column_reference_plug_ins", |
|||
principalColumn: "id"); |
|||
}, |
|||
comment: "字段对照主表"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "column_reference_code", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), |
|||
column_reference_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "字段对照主表ID"), |
|||
code_value = table.Column<string>(type: "text", nullable: false, comment: "本系统编码值"), |
|||
filter_code_value = table.Column<string>(type: "text", nullable: true, comment: "过滤编码值"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_column_reference_code", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_columnreferencecode_columnreference", |
|||
column: x => x.column_reference_id, |
|||
principalTable: "column_reference", |
|||
principalColumn: "id"); |
|||
}, |
|||
comment: "字段对照本系统编码表"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "column_reference_interface", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), |
|||
column_reference_code_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "字段对照本系统编码表ID"), |
|||
interface_code_value = table.Column<string>(type: "text", nullable: false, comment: "第三方系统编码值"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_column_reference_interface", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_columnreferenceinterface_columnreferencecode", |
|||
column: x => x.column_reference_code_id, |
|||
principalTable: "column_reference_code", |
|||
principalColumn: "id"); |
|||
}, |
|||
comment: "字段对照第三方系统编码表"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_column_reference_column_reference_plug_ins_id", |
|||
table: "column_reference", |
|||
column: "column_reference_plug_ins_id"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_column_reference_code_column_reference_id", |
|||
table: "column_reference_code", |
|||
column: "column_reference_id"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_column_reference_interface_column_reference_code_id", |
|||
table: "column_reference_interface", |
|||
column: "column_reference_code_id"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "column_reference_interface"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "column_reference_code"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "column_reference"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "column_reference_plug_ins"); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue