7 changed files with 14535 additions and 75 deletions
-
9src/Shentun.Peis.Application/CollectItemTypes/CollectItemTypeAppService.cs
-
2src/Shentun.Peis.Domain/CollectItemTypes/CollectItemType.cs
-
33src/Shentun.Peis.EntityFrameworkCore/DbMapping/CollectItemTypes/CollectItemTypeDbMapping.cs
-
7src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
-
14165src/Shentun.Peis.EntityFrameworkCore/Migrations/20240502143341_init20240502003.Designer.cs
-
242src/Shentun.Peis.EntityFrameworkCore/Migrations/20240502143341_init20240502003.cs
-
152src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
@ -0,0 +1,33 @@ |
|||||
|
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.CollectItemTypes; |
||||
|
using Shentun.Peis.EntityFrameworkCore; |
||||
|
|
||||
|
namespace Shentun.Peis.DbMapping |
||||
|
{ |
||||
|
|
||||
|
internal class CollectItemTypeDbMapping : IEntityTypeConfiguration<CollectItemType> |
||||
|
{ |
||||
|
public void Configure(EntityTypeBuilder<CollectItemType> entity) |
||||
|
{ |
||||
|
entity.HasComment("汇总项目类别"); |
||||
|
entity.Property(t => t.DisplayName).HasComment("名称").IsRequired(); |
||||
|
entity.Property(t => t.DisplayOrder).HasComment("显示顺序").IsRequired(); |
||||
|
entity.Property(t => t.InvoiceItemTypeId).HasComment("发票项目类别ID").IsRequired(); |
||||
|
entity.Property(t => t.SimpleCode).HasComment("简码").IsRequired(); |
||||
|
entity.Property(e => e.Id) |
||||
|
.IsFixedLength() |
||||
|
.HasComment("编号").HasColumnName("id"); |
||||
|
|
||||
|
|
||||
|
|
||||
|
entity.ConfigureByConvention(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
14165
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240502143341_init20240502003.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,242 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Shentun.Peis.Migrations |
||||
|
{ |
||||
|
public partial class init20240502003 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "Id", |
||||
|
table: "collect_item_type", |
||||
|
newName: "id"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "LastModifierId", |
||||
|
table: "collect_item_type", |
||||
|
newName: "last_modifier_id"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "LastModificationTime", |
||||
|
table: "collect_item_type", |
||||
|
newName: "last_modification_time"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "CreatorId", |
||||
|
table: "collect_item_type", |
||||
|
newName: "creator_id"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "CreationTime", |
||||
|
table: "collect_item_type", |
||||
|
newName: "creation_time"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "ConcurrencyStamp", |
||||
|
table: "collect_item_type", |
||||
|
newName: "concurrency_stamp"); |
||||
|
|
||||
|
migrationBuilder.AlterTable( |
||||
|
name: "collect_item_type", |
||||
|
comment: "汇总项目类别"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "simple_code", |
||||
|
table: "collect_item_type", |
||||
|
type: "character varying(50)", |
||||
|
maxLength: 50, |
||||
|
nullable: false, |
||||
|
defaultValue: "", |
||||
|
comment: "简码", |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "character varying(50)", |
||||
|
oldMaxLength: 50, |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "invoice_item_type_id", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
comment: "发票项目类别ID", |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<int>( |
||||
|
name: "display_order", |
||||
|
table: "collect_item_type", |
||||
|
type: "integer", |
||||
|
nullable: false, |
||||
|
comment: "显示顺序", |
||||
|
oldClrType: typeof(int), |
||||
|
oldType: "integer"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "display_name", |
||||
|
table: "collect_item_type", |
||||
|
type: "character varying(50)", |
||||
|
maxLength: 50, |
||||
|
nullable: false, |
||||
|
defaultValue: "", |
||||
|
comment: "名称", |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "character varying(50)", |
||||
|
oldMaxLength: 50, |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "id", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
fixedLength: true, |
||||
|
nullable: false, |
||||
|
comment: "编号", |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "last_modifier_id", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<DateTime>( |
||||
|
name: "last_modification_time", |
||||
|
table: "collect_item_type", |
||||
|
type: "timestamp without time zone", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
||||
|
oldClrType: typeof(DateTime), |
||||
|
oldType: "timestamp without time zone", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "creator_id", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid", |
||||
|
oldNullable: true); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "id", |
||||
|
table: "collect_item_type", |
||||
|
newName: "Id"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "last_modifier_id", |
||||
|
table: "collect_item_type", |
||||
|
newName: "LastModifierId"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "last_modification_time", |
||||
|
table: "collect_item_type", |
||||
|
newName: "LastModificationTime"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "creator_id", |
||||
|
table: "collect_item_type", |
||||
|
newName: "CreatorId"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "creation_time", |
||||
|
table: "collect_item_type", |
||||
|
newName: "CreationTime"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "concurrency_stamp", |
||||
|
table: "collect_item_type", |
||||
|
newName: "ConcurrencyStamp"); |
||||
|
|
||||
|
migrationBuilder.AlterTable( |
||||
|
name: "collect_item_type", |
||||
|
oldComment: "汇总项目类别"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "simple_code", |
||||
|
table: "collect_item_type", |
||||
|
type: "character varying(50)", |
||||
|
maxLength: 50, |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "character varying(50)", |
||||
|
oldMaxLength: 50, |
||||
|
oldComment: "简码"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "invoice_item_type_id", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid", |
||||
|
oldComment: "发票项目类别ID"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<int>( |
||||
|
name: "display_order", |
||||
|
table: "collect_item_type", |
||||
|
type: "integer", |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(int), |
||||
|
oldType: "integer", |
||||
|
oldComment: "显示顺序"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "display_name", |
||||
|
table: "collect_item_type", |
||||
|
type: "character varying(50)", |
||||
|
maxLength: 50, |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "character varying(50)", |
||||
|
oldMaxLength: 50, |
||||
|
oldComment: "名称"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "Id", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid", |
||||
|
oldFixedLength: true, |
||||
|
oldComment: "编号"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "LastModifierId", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<DateTime>( |
||||
|
name: "LastModificationTime", |
||||
|
table: "collect_item_type", |
||||
|
type: "timestamp without time zone", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(DateTime), |
||||
|
oldType: "timestamp without time zone"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<Guid>( |
||||
|
name: "CreatorId", |
||||
|
table: "collect_item_type", |
||||
|
type: "uuid", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(Guid), |
||||
|
oldType: "uuid"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue