mirror of
https://github.com/SamueleLorefice/isleBot.git
synced 2026-01-15 06:03:42 +00:00
Adeed base database build
This commit is contained in:
159
Migrations/20231107003428_Initial.Designer.cs
generated
Normal file
159
Migrations/20231107003428_Initial.Designer.cs
generated
Normal file
@@ -0,0 +1,159 @@
|
||||
// <auto-generated />
|
||||
using IsleBot;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IsleBot.Migrations
|
||||
{
|
||||
[DbContext(typeof(DbManager))]
|
||||
[Migration("20231107003428_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.13");
|
||||
|
||||
modelBuilder.Entity("IsleBot.Card", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Attack")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CurrentHealth")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Defense")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("MaxHealth")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("OwnerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OwnerId");
|
||||
|
||||
b.ToTable("Cards");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IsleBot.Match", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("PlayedTurns")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("PlayerACardId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("PlayerAId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("PlayerBCardId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("PlayerBId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PlayerACardId");
|
||||
|
||||
b.HasIndex("PlayerAId");
|
||||
|
||||
b.HasIndex("PlayerBCardId");
|
||||
|
||||
b.HasIndex("PlayerBId");
|
||||
|
||||
b.ToTable("Matches");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IsleBot.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Players");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IsleBot.Card", b =>
|
||||
{
|
||||
b.HasOne("IsleBot.User", "Owner")
|
||||
.WithMany("Cards")
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IsleBot.Match", b =>
|
||||
{
|
||||
b.HasOne("IsleBot.Card", "PlayerACard")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlayerACardId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IsleBot.User", "PlayerA")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlayerAId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IsleBot.Card", "PlayerBCard")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlayerBCardId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IsleBot.User", "PlayerB")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlayerBId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("PlayerA");
|
||||
|
||||
b.Navigation("PlayerACard");
|
||||
|
||||
b.Navigation("PlayerB");
|
||||
|
||||
b.Navigation("PlayerBCard");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IsleBot.User", b =>
|
||||
{
|
||||
b.Navigation("Cards");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user