10 changed files with 16448 additions and 2 deletions
-
19src/Shentun.Peis.Application.Contracts/Items/CreateItemBigtextResultTypeInputDto.cs
-
14src/Shentun.Peis.Application.Contracts/Items/GetItemBigtextResultTypeByItemIdDto.cs
-
14src/Shentun.Peis.Application.Contracts/Items/ItemIdInputDto.cs
-
47src/Shentun.Peis.Application/Items/ItemAppService.cs
-
38src/Shentun.Peis.Domain/ItemBigtextResultTypes/ItemBigtextResultType.cs
-
34src/Shentun.Peis.EntityFrameworkCore/DbMapping/ItemBigtextResultTypes/ItemBigtextResultTypeDbMapping.cs
-
5src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
-
16218src/Shentun.Peis.EntityFrameworkCore/Migrations/20241123071327_add_item_bigtext_result_type.Designer.cs
-
33src/Shentun.Peis.EntityFrameworkCore/Migrations/20241123071327_add_item_bigtext_result_type.cs
-
28src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.Peis.Items |
||||
|
{ |
||||
|
public class CreateItemBigtextResultTypeInputDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 项目ID
|
||||
|
/// </summary>
|
||||
|
public Guid ItemId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 词条类别ID集合
|
||||
|
/// </summary>
|
||||
|
public List<Guid> ItemBigtextResultTypeIds { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.Peis.Items |
||||
|
{ |
||||
|
public class GetItemBigtextResultTypeByItemIdDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 词条类别ID
|
||||
|
/// </summary>
|
||||
|
public Guid ItemBigtextResultTypeId { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.Peis.Items |
||||
|
{ |
||||
|
public class ItemIdInputDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public Guid ItemId { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
using Shentun.Peis.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Entities; |
||||
|
|
||||
|
namespace Shentun.Peis.Models |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 项目对应词条类别表
|
||||
|
/// </summary>
|
||||
|
[Table("item_bigtext_result_type")] |
||||
|
public class ItemBigtextResultType : Entity, IHasConcurrencyStamp |
||||
|
{ |
||||
|
[Key] |
||||
|
[Column("item_id")] |
||||
|
public Guid ItemId { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 项目编码
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("bigtext_result_type_id")] |
||||
|
public Guid BigtextResultTypeId { get; set; } |
||||
|
|
||||
|
[Column("concurrency_stamp")] |
||||
|
public string ConcurrencyStamp { get; set; } |
||||
|
|
||||
|
|
||||
|
public override object[] GetKeys() |
||||
|
{ |
||||
|
return new object[] { BigtextResultTypeId, ItemId }; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
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 ItemBigtextResultTypeDbMapping : IEntityTypeConfiguration<ItemBigtextResultType> |
||||
|
{ |
||||
|
public void Configure(EntityTypeBuilder<ItemBigtextResultType> entity) |
||||
|
{ |
||||
|
|
||||
|
entity.HasKey(e => new { e.BigtextResultTypeId, e.ItemId }) |
||||
|
.HasName("pk_item_bigtext_result_type"); |
||||
|
|
||||
|
entity.HasComment("项目对应词条类别表"); |
||||
|
|
||||
|
entity.Property(t => t.ItemId).HasComment("项目编码").IsRequired().IsFixedLength(); ; |
||||
|
|
||||
|
entity.Property(e => e.BigtextResultTypeId).HasComment("词条类别id").IsFixedLength().IsRequired(); |
||||
|
|
||||
|
|
||||
|
entity.ConfigureByConvention(); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
16218
src/Shentun.Peis.EntityFrameworkCore/Migrations/20241123071327_add_item_bigtext_result_type.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,33 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Shentun.Peis.Migrations |
||||
|
{ |
||||
|
public partial class add_item_bigtext_result_type : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "item_bigtext_result_type", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
item_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "项目编码"), |
||||
|
bigtext_result_type_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "词条类别id"), |
||||
|
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("pk_item_bigtext_result_type", x => new { x.bigtext_result_type_id, x.item_id }); |
||||
|
}, |
||||
|
comment: "项目对应词条类别表"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "item_bigtext_result_type"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue