✨ Wallet funds
This commit is contained in:
@@ -1387,6 +1387,116 @@ namespace DysonNetwork.Pass.Migrations
|
||||
b.ToTable("wallet_coupons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFund", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<Instant>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_at");
|
||||
|
||||
b.Property<Guid>("CreatorAccountId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("creator_account_id");
|
||||
|
||||
b.Property<string>("Currency")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("character varying(128)")
|
||||
.HasColumnName("currency");
|
||||
|
||||
b.Property<Instant?>("DeletedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("deleted_at");
|
||||
|
||||
b.Property<Instant>("ExpiredAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("expired_at");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasMaxLength(4096)
|
||||
.HasColumnType("character varying(4096)")
|
||||
.HasColumnName("message");
|
||||
|
||||
b.Property<int>("SplitType")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("split_type");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("status");
|
||||
|
||||
b.Property<decimal>("TotalAmount")
|
||||
.HasColumnType("numeric")
|
||||
.HasColumnName("total_amount");
|
||||
|
||||
b.Property<Instant>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("updated_at");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_wallet_funds");
|
||||
|
||||
b.HasIndex("CreatorAccountId")
|
||||
.HasDatabaseName("ix_wallet_funds_creator_account_id");
|
||||
|
||||
b.ToTable("wallet_funds", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFundRecipient", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<decimal>("Amount")
|
||||
.HasColumnType("numeric")
|
||||
.HasColumnName("amount");
|
||||
|
||||
b.Property<Instant>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_at");
|
||||
|
||||
b.Property<Instant?>("DeletedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("deleted_at");
|
||||
|
||||
b.Property<Guid>("FundId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("fund_id");
|
||||
|
||||
b.Property<bool>("IsReceived")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_received");
|
||||
|
||||
b.Property<Instant?>("ReceivedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("received_at");
|
||||
|
||||
b.Property<Guid>("RecipientAccountId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("recipient_account_id");
|
||||
|
||||
b.Property<Instant>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("updated_at");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_wallet_fund_recipients");
|
||||
|
||||
b.HasIndex("FundId")
|
||||
.HasDatabaseName("ix_wallet_fund_recipients_fund_id");
|
||||
|
||||
b.HasIndex("RecipientAccountId")
|
||||
.HasDatabaseName("ix_wallet_fund_recipients_recipient_account_id");
|
||||
|
||||
b.ToTable("wallet_fund_recipients", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -1464,6 +1574,10 @@ namespace DysonNetwork.Pass.Migrations
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("status");
|
||||
|
||||
b.Property<Guid?>("SubscriptionId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("subscription_id");
|
||||
|
||||
b.Property<string>("SubscriptionIdentifier")
|
||||
.IsRequired()
|
||||
.HasMaxLength(4096)
|
||||
@@ -1492,6 +1606,10 @@ namespace DysonNetwork.Pass.Migrations
|
||||
b.HasIndex("RedeemerId")
|
||||
.HasDatabaseName("ix_wallet_gifts_redeemer_id");
|
||||
|
||||
b.HasIndex("SubscriptionId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_wallet_gifts_subscription_id");
|
||||
|
||||
b.ToTable("wallet_gifts", (string)null);
|
||||
});
|
||||
|
||||
@@ -1648,10 +1766,6 @@ namespace DysonNetwork.Pass.Migrations
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("ended_at");
|
||||
|
||||
b.Property<Guid?>("GiftId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("gift_id");
|
||||
|
||||
b.Property<string>("Identifier")
|
||||
.IsRequired()
|
||||
.HasMaxLength(4096)
|
||||
@@ -1698,10 +1812,6 @@ namespace DysonNetwork.Pass.Migrations
|
||||
b.HasIndex("CouponId")
|
||||
.HasDatabaseName("ix_wallet_subscriptions_coupon_id");
|
||||
|
||||
b.HasIndex("GiftId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_wallet_subscriptions_gift_id");
|
||||
|
||||
b.HasIndex("Identifier")
|
||||
.HasDatabaseName("ix_wallet_subscriptions_identifier");
|
||||
|
||||
@@ -2055,6 +2165,39 @@ namespace DysonNetwork.Pass.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFund", b =>
|
||||
{
|
||||
b.HasOne("DysonNetwork.Shared.Models.SnAccount", "CreatorAccount")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorAccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_wallet_funds_accounts_creator_account_id");
|
||||
|
||||
b.Navigation("CreatorAccount");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFundRecipient", b =>
|
||||
{
|
||||
b.HasOne("DysonNetwork.Shared.Models.SnWalletFund", "Fund")
|
||||
.WithMany("Recipients")
|
||||
.HasForeignKey("FundId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_wallet_fund_recipients_wallet_funds_fund_id");
|
||||
|
||||
b.HasOne("DysonNetwork.Shared.Models.SnAccount", "RecipientAccount")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipientAccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_wallet_fund_recipients_accounts_recipient_account_id");
|
||||
|
||||
b.Navigation("Fund");
|
||||
|
||||
b.Navigation("RecipientAccount");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b =>
|
||||
{
|
||||
b.HasOne("DysonNetwork.Shared.Models.SnWalletCoupon", "Coupon")
|
||||
@@ -2079,6 +2222,11 @@ namespace DysonNetwork.Pass.Migrations
|
||||
.HasForeignKey("RedeemerId")
|
||||
.HasConstraintName("fk_wallet_gifts_accounts_redeemer_id");
|
||||
|
||||
b.HasOne("DysonNetwork.Shared.Models.SnWalletSubscription", "Subscription")
|
||||
.WithOne("Gift")
|
||||
.HasForeignKey("DysonNetwork.Shared.Models.SnWalletGift", "SubscriptionId")
|
||||
.HasConstraintName("fk_wallet_gifts_wallet_subscriptions_subscription_id");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
|
||||
b.Navigation("Gifter");
|
||||
@@ -2086,6 +2234,8 @@ namespace DysonNetwork.Pass.Migrations
|
||||
b.Navigation("Recipient");
|
||||
|
||||
b.Navigation("Redeemer");
|
||||
|
||||
b.Navigation("Subscription");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletOrder", b =>
|
||||
@@ -2131,16 +2281,9 @@ namespace DysonNetwork.Pass.Migrations
|
||||
.HasForeignKey("CouponId")
|
||||
.HasConstraintName("fk_wallet_subscriptions_wallet_coupons_coupon_id");
|
||||
|
||||
b.HasOne("DysonNetwork.Shared.Models.SnWalletGift", "Gift")
|
||||
.WithOne("Subscription")
|
||||
.HasForeignKey("DysonNetwork.Shared.Models.SnWalletSubscription", "GiftId")
|
||||
.HasConstraintName("fk_wallet_subscriptions_wallet_gifts_gift_id");
|
||||
|
||||
b.Navigation("Account");
|
||||
|
||||
b.Navigation("Coupon");
|
||||
|
||||
b.Navigation("Gift");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletTransaction", b =>
|
||||
@@ -2194,9 +2337,14 @@ namespace DysonNetwork.Pass.Migrations
|
||||
b.Navigation("Pockets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b =>
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFund", b =>
|
||||
{
|
||||
b.Navigation("Subscription");
|
||||
b.Navigation("Recipients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletSubscription", b =>
|
||||
{
|
||||
b.Navigation("Gift");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
Reference in New Issue
Block a user