827 lines
33 KiB
C#
827 lines
33 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using DysonNetwork.Shared.Models;
|
|
using DysonNetwork.Wallet;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using NodaTime;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace DysonNetwork.Wallet.Migrations
|
|
{
|
|
[DbContext(typeof(AppDatabase))]
|
|
[Migration("20260203080529_InitialMigration")]
|
|
partial class InitialMigration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AccountId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("account_id");
|
|
|
|
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<Instant?>("DrawDate")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("draw_date");
|
|
|
|
b.Property<int>("DrawStatus")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("draw_status");
|
|
|
|
b.PrimitiveCollection<string>("MatchedRegionOneNumbers")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("matched_region_one_numbers");
|
|
|
|
b.Property<int?>("MatchedRegionTwoNumber")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("matched_region_two_number");
|
|
|
|
b.Property<int>("Multiplier")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("multiplier");
|
|
|
|
b.PrimitiveCollection<string>("RegionOneNumbers")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("region_one_numbers");
|
|
|
|
b.Property<int>("RegionTwoNumber")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("region_two_number");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_lotteries");
|
|
|
|
b.ToTable("lotteries", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnLotteryRecord", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
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<Instant>("DrawDate")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("draw_date");
|
|
|
|
b.Property<long>("TotalPrizeAmount")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("total_prize_amount");
|
|
|
|
b.Property<int>("TotalPrizesAwarded")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("total_prizes_awarded");
|
|
|
|
b.Property<int>("TotalTickets")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("total_tickets");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.PrimitiveCollection<string>("WinningRegionOneNumbers")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("winning_region_one_numbers");
|
|
|
|
b.Property<int>("WinningRegionTwoNumber")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("winning_region_two_number");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_lottery_records");
|
|
|
|
b.ToTable("lottery_records", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AccountId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("account_id");
|
|
|
|
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<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_wallets");
|
|
|
|
b.ToTable("wallets", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletCoupon", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Instant?>("AffectedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("affected_at");
|
|
|
|
b.Property<string>("Code")
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("code");
|
|
|
|
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<decimal?>("DiscountAmount")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("discount_amount");
|
|
|
|
b.Property<double?>("DiscountRate")
|
|
.HasColumnType("double precision")
|
|
.HasColumnName("discount_rate");
|
|
|
|
b.Property<Instant?>("ExpiredAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expired_at");
|
|
|
|
b.Property<string>("Identifier")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("identifier");
|
|
|
|
b.Property<int?>("MaxUsage")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("max_usage");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_wallet_coupons");
|
|
|
|
b.ToTable("wallet_coupons", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFund", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<int>("AmountOfSplits")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("amount_of_splits");
|
|
|
|
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<bool>("IsOpen")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_open");
|
|
|
|
b.Property<string>("Message")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("message");
|
|
|
|
b.Property<decimal>("RemainingAmount")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("remaining_amount");
|
|
|
|
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.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.ToTable("wallet_fund_recipients", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<decimal>("BasePrice")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("base_price");
|
|
|
|
b.Property<Guid?>("CouponId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("coupon_id");
|
|
|
|
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<Instant>("ExpiresAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expires_at");
|
|
|
|
b.Property<decimal>("FinalPrice")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("final_price");
|
|
|
|
b.Property<string>("GiftCode")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("gift_code");
|
|
|
|
b.Property<Guid>("GifterId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("gifter_id");
|
|
|
|
b.Property<bool>("IsOpenGift")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_open_gift");
|
|
|
|
b.Property<string>("Message")
|
|
.HasMaxLength(1000)
|
|
.HasColumnType("character varying(1000)")
|
|
.HasColumnName("message");
|
|
|
|
b.Property<SnPaymentDetails>("PaymentDetails")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("payment_details");
|
|
|
|
b.Property<string>("PaymentMethod")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("payment_method");
|
|
|
|
b.Property<Guid?>("RecipientId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("recipient_id");
|
|
|
|
b.Property<Instant?>("RedeemedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("redeemed_at");
|
|
|
|
b.Property<Guid?>("RedeemerId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("redeemer_id");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("status");
|
|
|
|
b.Property<Guid?>("SubscriptionId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("subscription_id");
|
|
|
|
b.Property<string>("SubscriptionIdentifier")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("subscription_identifier");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_wallet_gifts");
|
|
|
|
b.HasIndex("CouponId")
|
|
.HasDatabaseName("ix_wallet_gifts_coupon_id");
|
|
|
|
b.HasIndex("GiftCode")
|
|
.HasDatabaseName("ix_wallet_gifts_gift_code");
|
|
|
|
b.HasIndex("GifterId")
|
|
.HasDatabaseName("ix_wallet_gifts_gifter_id");
|
|
|
|
b.HasIndex("RecipientId")
|
|
.HasDatabaseName("ix_wallet_gifts_recipient_id");
|
|
|
|
b.HasIndex("SubscriptionId")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_wallet_gifts_subscription_id");
|
|
|
|
b.ToTable("wallet_gifts", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletOrder", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<decimal>("Amount")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("amount");
|
|
|
|
b.Property<string>("AppIdentifier")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("app_identifier");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
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<Dictionary<string, object>>("Meta")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("meta");
|
|
|
|
b.Property<Guid?>("PayeeWalletId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("payee_wallet_id");
|
|
|
|
b.Property<string>("ProductIdentifier")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("product_identifier");
|
|
|
|
b.Property<string>("Remarks")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("remarks");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("status");
|
|
|
|
b.Property<Guid?>("TransactionId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("transaction_id");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_payment_orders");
|
|
|
|
b.HasIndex("PayeeWalletId")
|
|
.HasDatabaseName("ix_payment_orders_payee_wallet_id");
|
|
|
|
b.HasIndex("TransactionId")
|
|
.HasDatabaseName("ix_payment_orders_transaction_id");
|
|
|
|
b.ToTable("payment_orders", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletPocket", 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<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>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<Guid>("WalletId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("wallet_id");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_wallet_pockets");
|
|
|
|
b.HasIndex("WalletId")
|
|
.HasDatabaseName("ix_wallet_pockets_wallet_id");
|
|
|
|
b.ToTable("wallet_pockets", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletSubscription", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AccountId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<decimal>("BasePrice")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("base_price");
|
|
|
|
b.Property<Instant>("BegunAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("begun_at");
|
|
|
|
b.Property<Guid?>("CouponId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("coupon_id");
|
|
|
|
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<Instant?>("EndedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("ended_at");
|
|
|
|
b.Property<string>("Identifier")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("identifier");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_active");
|
|
|
|
b.Property<bool>("IsFreeTrial")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_free_trial");
|
|
|
|
b.Property<SnPaymentDetails>("PaymentDetails")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("payment_details");
|
|
|
|
b.Property<string>("PaymentMethod")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("payment_method");
|
|
|
|
b.Property<Instant?>("RenewalAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("renewal_at");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("status");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_wallet_subscriptions");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_wallet_subscriptions_account_id");
|
|
|
|
b.HasIndex("CouponId")
|
|
.HasDatabaseName("ix_wallet_subscriptions_coupon_id");
|
|
|
|
b.HasIndex("Identifier")
|
|
.HasDatabaseName("ix_wallet_subscriptions_identifier");
|
|
|
|
b.HasIndex("Status")
|
|
.HasDatabaseName("ix_wallet_subscriptions_status");
|
|
|
|
b.HasIndex("AccountId", "Identifier")
|
|
.HasDatabaseName("ix_wallet_subscriptions_account_id_identifier");
|
|
|
|
b.HasIndex("AccountId", "IsActive")
|
|
.HasDatabaseName("ix_wallet_subscriptions_account_id_is_active");
|
|
|
|
b.ToTable("wallet_subscriptions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletTransaction", 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<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<Guid?>("PayeeWalletId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("payee_wallet_id");
|
|
|
|
b.Property<Guid?>("PayerWalletId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("payer_wallet_id");
|
|
|
|
b.Property<string>("Remarks")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("remarks");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_payment_transactions");
|
|
|
|
b.HasIndex("PayeeWalletId")
|
|
.HasDatabaseName("ix_payment_transactions_payee_wallet_id");
|
|
|
|
b.HasIndex("PayerWalletId")
|
|
.HasDatabaseName("ix_payment_transactions_payer_wallet_id");
|
|
|
|
b.ToTable("payment_transactions", (string)null);
|
|
});
|
|
|
|
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.Navigation("Fund");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Shared.Models.SnWalletCoupon", "Coupon")
|
|
.WithMany()
|
|
.HasForeignKey("CouponId")
|
|
.HasConstraintName("fk_wallet_gifts_wallet_coupons_coupon_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("Subscription");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletOrder", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Shared.Models.SnWallet", "PayeeWallet")
|
|
.WithMany()
|
|
.HasForeignKey("PayeeWalletId")
|
|
.HasConstraintName("fk_payment_orders_wallets_payee_wallet_id");
|
|
|
|
b.HasOne("DysonNetwork.Shared.Models.SnWalletTransaction", "Transaction")
|
|
.WithMany()
|
|
.HasForeignKey("TransactionId")
|
|
.HasConstraintName("fk_payment_orders_payment_transactions_transaction_id");
|
|
|
|
b.Navigation("PayeeWallet");
|
|
|
|
b.Navigation("Transaction");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletPocket", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Shared.Models.SnWallet", "Wallet")
|
|
.WithMany("Pockets")
|
|
.HasForeignKey("WalletId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_wallet_pockets_wallets_wallet_id");
|
|
|
|
b.Navigation("Wallet");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletSubscription", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Shared.Models.SnWalletCoupon", "Coupon")
|
|
.WithMany()
|
|
.HasForeignKey("CouponId")
|
|
.HasConstraintName("fk_wallet_subscriptions_wallet_coupons_coupon_id");
|
|
|
|
b.Navigation("Coupon");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletTransaction", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Shared.Models.SnWallet", "PayeeWallet")
|
|
.WithMany()
|
|
.HasForeignKey("PayeeWalletId")
|
|
.HasConstraintName("fk_payment_transactions_wallets_payee_wallet_id");
|
|
|
|
b.HasOne("DysonNetwork.Shared.Models.SnWallet", "PayerWallet")
|
|
.WithMany()
|
|
.HasForeignKey("PayerWalletId")
|
|
.HasConstraintName("fk_payment_transactions_wallets_payer_wallet_id");
|
|
|
|
b.Navigation("PayeeWallet");
|
|
|
|
b.Navigation("PayerWallet");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b =>
|
|
{
|
|
b.Navigation("Pockets");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFund", b =>
|
|
{
|
|
b.Navigation("Recipients");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletSubscription", b =>
|
|
{
|
|
b.Navigation("Gift");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|