// using System; using System.Collections.Generic; using DysonNetwork.Shared.Models; using DysonNetwork.Wallet; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using NodaTime; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace DysonNetwork.Wallet.Migrations { [DbContext(typeof(AppDatabase))] partial class AppDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DrawDate") .HasColumnType("timestamp with time zone") .HasColumnName("draw_date"); b.Property("DrawStatus") .HasColumnType("integer") .HasColumnName("draw_status"); b.PrimitiveCollection("MatchedRegionOneNumbers") .HasColumnType("jsonb") .HasColumnName("matched_region_one_numbers"); b.Property("MatchedRegionTwoNumber") .HasColumnType("integer") .HasColumnName("matched_region_two_number"); b.Property("Multiplier") .HasColumnType("integer") .HasColumnName("multiplier"); b.PrimitiveCollection("RegionOneNumbers") .IsRequired() .HasColumnType("jsonb") .HasColumnName("region_one_numbers"); b.Property("RegionTwoNumber") .HasColumnType("integer") .HasColumnName("region_two_number"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DrawDate") .HasColumnType("timestamp with time zone") .HasColumnName("draw_date"); b.Property("TotalPrizeAmount") .HasColumnType("bigint") .HasColumnName("total_prize_amount"); b.Property("TotalPrizesAwarded") .HasColumnType("integer") .HasColumnName("total_prizes_awarded"); b.Property("TotalTickets") .HasColumnType("integer") .HasColumnName("total_tickets"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.PrimitiveCollection("WinningRegionOneNumbers") .IsRequired() .HasColumnType("jsonb") .HasColumnName("winning_region_one_numbers"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AffectedAt") .HasColumnType("timestamp with time zone") .HasColumnName("affected_at"); b.Property("Code") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("code"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DiscountAmount") .HasColumnType("numeric") .HasColumnName("discount_amount"); b.Property("DiscountRate") .HasColumnType("double precision") .HasColumnName("discount_rate"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("Identifier") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("identifier"); b.Property("MaxUsage") .HasColumnType("integer") .HasColumnName("max_usage"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AmountOfSplits") .HasColumnType("integer") .HasColumnName("amount_of_splits"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatorAccountId") .HasColumnType("uuid") .HasColumnName("creator_account_id"); b.Property("Currency") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("currency"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("IsOpen") .HasColumnType("boolean") .HasColumnName("is_open"); b.Property("Message") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("message"); b.Property("RemainingAmount") .HasColumnType("numeric") .HasColumnName("remaining_amount"); b.Property("SplitType") .HasColumnType("integer") .HasColumnName("split_type"); b.Property("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property("TotalAmount") .HasColumnType("numeric") .HasColumnName("total_amount"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Amount") .HasColumnType("numeric") .HasColumnName("amount"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("FundId") .HasColumnType("uuid") .HasColumnName("fund_id"); b.Property("IsReceived") .HasColumnType("boolean") .HasColumnName("is_received"); b.Property("ReceivedAt") .HasColumnType("timestamp with time zone") .HasColumnName("received_at"); b.Property("RecipientAccountId") .HasColumnType("uuid") .HasColumnName("recipient_account_id"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("BasePrice") .HasColumnType("numeric") .HasColumnName("base_price"); b.Property("CouponId") .HasColumnType("uuid") .HasColumnName("coupon_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ExpiresAt") .HasColumnType("timestamp with time zone") .HasColumnName("expires_at"); b.Property("FinalPrice") .HasColumnType("numeric") .HasColumnName("final_price"); b.Property("GiftCode") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("gift_code"); b.Property("GifterId") .HasColumnType("uuid") .HasColumnName("gifter_id"); b.Property("IsOpenGift") .HasColumnType("boolean") .HasColumnName("is_open_gift"); b.Property("Message") .HasMaxLength(1000) .HasColumnType("character varying(1000)") .HasColumnName("message"); b.Property("PaymentDetails") .IsRequired() .HasColumnType("jsonb") .HasColumnName("payment_details"); b.Property("PaymentMethod") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("payment_method"); b.Property("RecipientId") .HasColumnType("uuid") .HasColumnName("recipient_id"); b.Property("RedeemedAt") .HasColumnType("timestamp with time zone") .HasColumnName("redeemed_at"); b.Property("RedeemerId") .HasColumnType("uuid") .HasColumnName("redeemer_id"); b.Property("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property("SubscriptionId") .HasColumnType("uuid") .HasColumnName("subscription_id"); b.Property("SubscriptionIdentifier") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("subscription_identifier"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Amount") .HasColumnType("numeric") .HasColumnName("amount"); b.Property("AppIdentifier") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("app_identifier"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("Currency") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("currency"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property>("Meta") .HasColumnType("jsonb") .HasColumnName("meta"); b.Property("PayeeWalletId") .HasColumnType("uuid") .HasColumnName("payee_wallet_id"); b.Property("ProductIdentifier") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("product_identifier"); b.Property("Remarks") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("remarks"); b.Property("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property("TransactionId") .HasColumnType("uuid") .HasColumnName("transaction_id"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Amount") .HasColumnType("numeric") .HasColumnName("amount"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("Currency") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("currency"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("BasePrice") .HasColumnType("numeric") .HasColumnName("base_price"); b.Property("BegunAt") .HasColumnType("timestamp with time zone") .HasColumnName("begun_at"); b.Property("CouponId") .HasColumnType("uuid") .HasColumnName("coupon_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("EndedAt") .HasColumnType("timestamp with time zone") .HasColumnName("ended_at"); b.Property("Identifier") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("identifier"); b.Property("IsActive") .HasColumnType("boolean") .HasColumnName("is_active"); b.Property("IsFreeTrial") .HasColumnType("boolean") .HasColumnName("is_free_trial"); b.Property("PaymentDetails") .IsRequired() .HasColumnType("jsonb") .HasColumnName("payment_details"); b.Property("PaymentMethod") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("payment_method"); b.Property("RenewalAt") .HasColumnType("timestamp with time zone") .HasColumnName("renewal_at"); b.Property("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property("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("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("Amount") .HasColumnType("numeric") .HasColumnName("amount"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("Currency") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("currency"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("PayeeWalletId") .HasColumnType("uuid") .HasColumnName("payee_wallet_id"); b.Property("PayerWalletId") .HasColumnType("uuid") .HasColumnName("payer_wallet_id"); b.Property("Remarks") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("remarks"); b.Property("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property("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 } } }