10 changed files with 14714 additions and 15 deletions
-
4src/Shentun.Peis.Domain/ChargeAsbitems/ChargeAsbitem.cs
-
40src/Shentun.Peis.Domain/ChargeBackAsbitems/ChargeBackAsbitem.cs
-
12src/Shentun.Peis.Domain/ChargeBackPays/ChargeBackPay.cs
-
4src/Shentun.Peis.Domain/ChargeBacks/ChargeBack.cs
-
10src/Shentun.Peis.Domain/ChargePays/ChargePay.cs
-
42src/Shentun.Peis.EntityFrameworkCore/DbMapping/ChargeBackAsbitems/ChargeBackAsbitemDbMapping.cs
-
5src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
-
14474src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520151345_init20240520003.Designer.cs
-
60src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520151345_init20240520003.cs
-
78src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
@ -0,0 +1,40 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Shentun.Peis.Models; |
||||
|
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; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
|
namespace Shentun.Peis.Models |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 退费组合项目表
|
||||
|
/// </summary>
|
||||
|
[Table("charge_back_asbitem")] |
||||
|
[Index(nameof(ChargeBackId), nameof(ChargeAsbitemId), Name = "IX_charge_bak_asbitem_asbitem_id", IsUnique = true)] |
||||
|
public class ChargeBackAsbitem : AuditedEntity<Guid>, IHasConcurrencyStamp |
||||
|
{ |
||||
|
[Column("charge_back_id")] |
||||
|
public Guid ChargeBackId { get; set; } |
||||
|
|
||||
|
[Column("charge_asbitem_id")] |
||||
|
public Guid ChargeAsbitemId { get; set; } |
||||
|
|
||||
|
[Column("amount")] |
||||
|
public short Amount { get; set; } |
||||
|
|
||||
|
public string ConcurrencyStamp { get; set; } |
||||
|
|
||||
|
|
||||
|
[ForeignKey(nameof(ChargeBackId))] |
||||
|
public virtual ChargeBack ChargeBack { get; set; } |
||||
|
|
||||
|
[ForeignKey(nameof(ChargeAsbitemId))] |
||||
|
public virtual ChargeAsbitem ChargeAsbitem { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,42 @@ |
|||||
|
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 ChargeBackAsbitemDbMapping : IEntityTypeConfiguration<ChargeBackAsbitem> |
||||
|
{ |
||||
|
public void Configure(EntityTypeBuilder<ChargeBackAsbitem> entity) |
||||
|
{ |
||||
|
entity.HasComment("退费组合项目表"); |
||||
|
|
||||
|
entity.Property(e => e.Id).ValueGeneratedNever(); |
||||
|
|
||||
|
|
||||
|
entity.Property(e => e.ChargeBackId).IsRequired(); |
||||
|
|
||||
|
entity.Property(e => e.ChargeAsbitemId).IsRequired(); |
||||
|
|
||||
|
entity.HasOne(d => d.ChargeBack) |
||||
|
.WithMany(p => p.ChargeBackAsbitems) |
||||
|
.HasForeignKey(d => d.ChargeBackId) |
||||
|
.OnDelete(DeleteBehavior.ClientSetNull) |
||||
|
.HasConstraintName("fk_chargebackasbitem_chargeback"); |
||||
|
|
||||
|
entity.HasOne(d => d.ChargeAsbitem) |
||||
|
.WithMany(p => p.ChargeBackAsbitems) |
||||
|
.HasForeignKey(d => d.ChargeAsbitemId) |
||||
|
.OnDelete(DeleteBehavior.ClientSetNull) |
||||
|
.HasConstraintName("fk_chargebackasbitem_chargeasbitem"); |
||||
|
|
||||
|
entity.ConfigureByConvention(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
14474
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520151345_init20240520003.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,60 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Shentun.Peis.Migrations |
||||
|
{ |
||||
|
public partial class init20240520003 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "charge_back_asbitem", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
charge_back_id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
charge_asbitem_id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
amount = table.Column<short>(type: "smallint", nullable: false), |
||||
|
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_charge_back_asbitem", x => x.id); |
||||
|
table.ForeignKey( |
||||
|
name: "fk_chargebackasbitem_chargeasbitem", |
||||
|
column: x => x.charge_asbitem_id, |
||||
|
principalTable: "charge_asbitem", |
||||
|
principalColumn: "id"); |
||||
|
table.ForeignKey( |
||||
|
name: "fk_chargebackasbitem_chargeback", |
||||
|
column: x => x.charge_back_id, |
||||
|
principalTable: "charge_back", |
||||
|
principalColumn: "id"); |
||||
|
}, |
||||
|
comment: "退费组合项目表"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_charge_back_asbitem_charge_asbitem_id", |
||||
|
table: "charge_back_asbitem", |
||||
|
column: "charge_asbitem_id"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_charge_bak_asbitem_asbitem_id", |
||||
|
table: "charge_back_asbitem", |
||||
|
columns: new[] { "charge_back_id", "charge_asbitem_id" }, |
||||
|
unique: true); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "charge_back_asbitem"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue