feat(db): add gacha-point balance + received tables
This commit is contained in:
@@ -3476,6 +3476,65 @@ namespace SVSim.Database.Migrations
|
||||
.HasForeignKey("ViewerId");
|
||||
});
|
||||
|
||||
b.OwnsMany("SVSim.Database.Models.ViewerGachaPointBalance", "GachaPointBalances", b1 =>
|
||||
{
|
||||
b1.Property<long>("ViewerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property<int>("Id"));
|
||||
|
||||
b1.Property<int>("PackId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b1.Property<int>("Points")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b1.HasKey("ViewerId", "Id");
|
||||
|
||||
b1.HasIndex("ViewerId", "PackId")
|
||||
.IsUnique();
|
||||
|
||||
b1.ToTable("ViewerGachaPointBalance");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("ViewerId");
|
||||
});
|
||||
|
||||
b.OwnsMany("SVSim.Database.Models.ViewerGachaPointReceived", "GachaPointReceived", b1 =>
|
||||
{
|
||||
b1.Property<long>("ViewerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property<int>("Id"));
|
||||
|
||||
b1.Property<long>("CardId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<int>("PackId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b1.Property<DateTime>("ReceivedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b1.HasKey("ViewerId", "Id");
|
||||
|
||||
b1.HasIndex("ViewerId", "PackId", "CardId")
|
||||
.IsUnique();
|
||||
|
||||
b1.ToTable("ViewerGachaPointReceived");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("ViewerId");
|
||||
});
|
||||
|
||||
b.OwnsOne("SVSim.Database.Models.ViewerInfo", "Info", b1 =>
|
||||
{
|
||||
b1.Property<long>("ViewerId")
|
||||
@@ -3593,6 +3652,10 @@ namespace SVSim.Database.Migrations
|
||||
b.Navigation("Currency")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("GachaPointBalances");
|
||||
|
||||
b.Navigation("GachaPointReceived");
|
||||
|
||||
b.Navigation("Info")
|
||||
.IsRequired();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user