InitialCode Commit

This commit is contained in:
Mueller Wayan
2025-09-07 19:06:43 +02:00
parent 887948bb02
commit d29e25992b
183 changed files with 82537 additions and 0 deletions
@@ -0,0 +1,272 @@
// <auto-generated />
using System;
using MTG_CollectionVerwaltung.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MTG_CollectionVerwaltung.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20250818150713_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("AccessFailedCount")
.HasColumnType("INTEGER");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("EmailConfirmed")
.HasColumnType("INTEGER");
b.Property<bool>("LockoutEnabled")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("TEXT");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.HasColumnType("TEXT");
b.Property<string>("PhoneNumber")
.HasColumnType("TEXT");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("INTEGER");
b.Property<string>("SecurityStamp")
.HasColumnType("TEXT");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderKey")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderDisplayName")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,222 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MTG_CollectionVerwaltung.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AspNetRoles",
columns: table => new
{
Id = table.Column<string>(type: "TEXT", nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
NormalizedName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
ConcurrencyStamp = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AspNetUsers",
columns: table => new
{
Id = table.Column<string>(type: "TEXT", nullable: false),
UserName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
NormalizedUserName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
Email = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
NormalizedEmail = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(type: "INTEGER", nullable: false),
PasswordHash = table.Column<string>(type: "TEXT", nullable: true),
SecurityStamp = table.Column<string>(type: "TEXT", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "TEXT", nullable: true),
PhoneNumber = table.Column<string>(type: "TEXT", nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "INTEGER", nullable: false),
TwoFactorEnabled = table.Column<bool>(type: "INTEGER", nullable: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "TEXT", nullable: true),
LockoutEnabled = table.Column<bool>(type: "INTEGER", nullable: false),
AccessFailedCount = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AspNetRoleClaims",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
RoleId = table.Column<string>(type: "TEXT", nullable: false),
ClaimType = table.Column<string>(type: "TEXT", nullable: true),
ClaimValue = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
table.ForeignKey(
name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
column: x => x.RoleId,
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserClaims",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UserId = table.Column<string>(type: "TEXT", nullable: false),
ClaimType = table.Column<string>(type: "TEXT", nullable: true),
ClaimValue = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
table.ForeignKey(
name: "FK_AspNetUserClaims_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserLogins",
columns: table => new
{
LoginProvider = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
ProviderKey = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
ProviderDisplayName = table.Column<string>(type: "TEXT", nullable: true),
UserId = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
table.ForeignKey(
name: "FK_AspNetUserLogins_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserRoles",
columns: table => new
{
UserId = table.Column<string>(type: "TEXT", nullable: false),
RoleId = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
table.ForeignKey(
name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
column: x => x.RoleId,
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AspNetUserRoles_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserTokens",
columns: table => new
{
UserId = table.Column<string>(type: "TEXT", nullable: false),
LoginProvider = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
table.ForeignKey(
name: "FK_AspNetUserTokens_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AspNetRoleClaims_RoleId",
table: "AspNetRoleClaims",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "RoleNameIndex",
table: "AspNetRoles",
column: "NormalizedName",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_AspNetUserClaims_UserId",
table: "AspNetUserClaims",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AspNetUserLogins_UserId",
table: "AspNetUserLogins",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AspNetUserRoles_RoleId",
table: "AspNetUserRoles",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "EmailIndex",
table: "AspNetUsers",
column: "NormalizedEmail");
migrationBuilder.CreateIndex(
name: "UserNameIndex",
table: "AspNetUsers",
column: "NormalizedUserName",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AspNetRoleClaims");
migrationBuilder.DropTable(
name: "AspNetUserClaims");
migrationBuilder.DropTable(
name: "AspNetUserLogins");
migrationBuilder.DropTable(
name: "AspNetUserRoles");
migrationBuilder.DropTable(
name: "AspNetUserTokens");
migrationBuilder.DropTable(
name: "AspNetRoles");
migrationBuilder.DropTable(
name: "AspNetUsers");
}
}
}
@@ -0,0 +1,275 @@
// <auto-generated />
using System;
using MTG_CollectionVerwaltung.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MTG_CollectionVerwaltung.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20250819133730_AddMustChangePasswordToUsers")]
partial class AddMustChangePasswordToUsers
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("AccessFailedCount")
.HasColumnType("INTEGER");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("EmailConfirmed")
.HasColumnType("INTEGER");
b.Property<bool>("LockoutEnabled")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("TEXT");
b.Property<bool>("MustChangePassword")
.HasColumnType("INTEGER");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.HasColumnType("TEXT");
b.Property<string>("PhoneNumber")
.HasColumnType("TEXT");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("INTEGER");
b.Property<string>("SecurityStamp")
.HasColumnType("TEXT");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderKey")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderDisplayName")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MTG_CollectionVerwaltung.Migrations
{
/// <inheritdoc />
public partial class AddMustChangePasswordToUsers : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "MustChangePassword",
table: "AspNetUsers",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MustChangePassword",
table: "AspNetUsers");
}
}
}
@@ -0,0 +1,272 @@
// <auto-generated />
using System;
using MTG_CollectionVerwaltung.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MTG_CollectionVerwaltung.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("AccessFailedCount")
.HasColumnType("INTEGER");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("EmailConfirmed")
.HasColumnType("INTEGER");
b.Property<bool>("LockoutEnabled")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("TEXT");
b.Property<bool>("MustChangePassword")
.HasColumnType("INTEGER");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.HasColumnType("TEXT");
b.Property<string>("PhoneNumber")
.HasColumnType("TEXT");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("INTEGER");
b.Property<string>("SecurityStamp")
.HasColumnType("TEXT");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderKey")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderDisplayName")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,341 @@
// <auto-generated />
using System;
using MTG_CollectionVerwaltung.Data.MTGCollection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MTG_CollectionVerwaltung.Data.Migrations.MTG
{
[DbContext(typeof(MTGContext))]
[Migration("20250828091558_MTG_InitialCreate")]
partial class MTG_InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("CardName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<int>("Cmc")
.HasColumnType("INTEGER");
b.Property<string>("CollectorNumber")
.HasColumnType("TEXT");
b.Property<bool>("Foil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<string>("ManaCost")
.HasColumnType("TEXT");
b.Property<bool>("NonFoil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<string>("OtherFace")
.HasColumnType("TEXT");
b.Property<string>("Power")
.HasColumnType("TEXT");
b.Property<string>("Rarity")
.HasColumnType("TEXT");
b.Property<string>("SetCode")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property<int>("SuperTypeId")
.HasColumnType("INTEGER");
b.Property<string>("Toughness")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CardName");
b.HasIndex("SetCode");
b.HasIndex("SuperTypeId");
b.HasIndex("CollectorNumber", "SetCode");
b.ToTable("Cards");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardCollection", b =>
{
b.Property<string>("CardId")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.HasKey("CardId", "UserId");
b.HasIndex("UserId");
b.ToTable("CardCollections");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrinting", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CardId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("FlavorText")
.HasColumnType("TEXT");
b.Property<string>("ImageUriLarge")
.HasColumnType("TEXT");
b.Property<string>("ImageUriNormal")
.HasColumnType("TEXT");
b.Property<string>("ImageUriSmall")
.HasColumnType("TEXT");
b.Property<string>("Lang")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("OracleText")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("Id");
b.HasIndex("Name");
b.HasIndex("OracleText");
b.HasIndex("CardId", "Lang")
.IsUnique();
b.ToTable("CardPrintings");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrintingFts", b =>
{
b.Property<string>("CardId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FlavorText")
.HasColumnType("TEXT");
b.Property<string>("Lang")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("OracleText")
.HasColumnType("TEXT");
b.ToTable((string)null);
b.ToView(null, (string)null);
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardType", b =>
{
b.Property<string>("CardId")
.HasColumnType("TEXT");
b.Property<int>("TypeId")
.HasColumnType("INTEGER");
b.HasKey("CardId", "TypeId");
b.HasIndex("TypeId");
b.ToTable("CardTypes");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.MTGType", b =>
{
b.Property<int>("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("TypeEn")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("TypeId");
b.ToTable("Types");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Set", b =>
{
b.Property<string>("SetCode")
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property<int>("CardCount")
.HasColumnType("INTEGER");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("TEXT");
b.Property<string>("SetIcon")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SetName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<string>("SetType")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("SetCode");
b.ToTable("Sets");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Supertype", b =>
{
b.Property<int>("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("TypeEn")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("TypeId");
b.ToTable("Supertypes");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Set", "Set")
.WithMany("Cards")
.HasForeignKey("SetCode")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Supertype", "SuperType")
.WithMany()
.HasForeignKey("SuperTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Set");
b.Navigation("SuperType");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardCollection", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("Collections")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrinting", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("Printings")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardType", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("CardTypes")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.MTGType", "Type")
.WithMany()
.HasForeignKey("TypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
b.Navigation("Type");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.Navigation("CardTypes");
b.Navigation("Collections");
b.Navigation("Printings");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Set", b =>
{
b.Navigation("Cards");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,237 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MTG_CollectionVerwaltung.Data.Migrations.MTG
{
/// <inheritdoc />
public partial class MTG_InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Sets",
columns: table => new
{
SetCode = table.Column<string>(type: "TEXT", maxLength: 10, nullable: false),
SetName = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
SetIcon = table.Column<string>(type: "TEXT", nullable: false),
SetType = table.Column<string>(type: "TEXT", nullable: false),
CardCount = table.Column<int>(type: "INTEGER", nullable: false),
ReleaseDate = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Sets", x => x.SetCode);
});
migrationBuilder.CreateTable(
name: "Supertypes",
columns: table => new
{
TypeId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
TypeEn = table.Column<string>(type: "TEXT", nullable: false, collation: "NOCASE"),
TypeDe = table.Column<string>(type: "TEXT", nullable: false, collation: "NOCASE")
},
constraints: table =>
{
table.PrimaryKey("PK_Supertypes", x => x.TypeId);
});
migrationBuilder.CreateTable(
name: "Types",
columns: table => new
{
TypeId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
TypeEn = table.Column<string>(type: "TEXT", nullable: false, collation: "NOCASE"),
TypeDe = table.Column<string>(type: "TEXT", nullable: false, collation: "NOCASE")
},
constraints: table =>
{
table.PrimaryKey("PK_Types", x => x.TypeId);
});
migrationBuilder.CreateTable(
name: "Cards",
columns: table => new
{
Id = table.Column<string>(type: "TEXT", nullable: false),
SetCode = table.Column<string>(type: "TEXT", maxLength: 10, nullable: false),
CardName = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
CollectorNumber = table.Column<string>(type: "TEXT", nullable: true),
ManaCost = table.Column<string>(type: "TEXT", nullable: true),
Foil = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
NonFoil = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
Rarity = table.Column<string>(type: "TEXT", nullable: true),
Power = table.Column<string>(type: "TEXT", nullable: true),
Toughness = table.Column<string>(type: "TEXT", nullable: true),
SuperTypeId = table.Column<int>(type: "INTEGER", nullable: false),
Cmc = table.Column<int>(type: "INTEGER", nullable: false),
OtherFace = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Cards", x => x.Id);
table.ForeignKey(
name: "FK_Cards_Sets_SetCode",
column: x => x.SetCode,
principalTable: "Sets",
principalColumn: "SetCode",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Cards_Supertypes_SuperTypeId",
column: x => x.SuperTypeId,
principalTable: "Supertypes",
principalColumn: "TypeId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CardCollections",
columns: table => new
{
CardId = table.Column<string>(type: "TEXT", nullable: false),
UserId = table.Column<string>(type: "TEXT", nullable: false),
Count = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CardCollections", x => new { x.CardId, x.UserId });
table.ForeignKey(
name: "FK_CardCollections_Cards_CardId",
column: x => x.CardId,
principalTable: "Cards",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CardPrintings",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CardId = table.Column<string>(type: "TEXT", maxLength: 40, nullable: false),
Lang = table.Column<string>(type: "TEXT", maxLength: 5, nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false, collation: "NOCASE"),
OracleText = table.Column<string>(type: "TEXT", nullable: true, collation: "NOCASE"),
FlavorText = table.Column<string>(type: "TEXT", nullable: true),
ImageUriSmall = table.Column<string>(type: "TEXT", nullable: true),
ImageUriNormal = table.Column<string>(type: "TEXT", nullable: true),
ImageUriLarge = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CardPrintings", x => x.Id);
table.ForeignKey(
name: "FK_CardPrintings_Cards_CardId",
column: x => x.CardId,
principalTable: "Cards",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CardTypes",
columns: table => new
{
CardId = table.Column<string>(type: "TEXT", nullable: false),
TypeId = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CardTypes", x => new { x.CardId, x.TypeId });
table.ForeignKey(
name: "FK_CardTypes_Cards_CardId",
column: x => x.CardId,
principalTable: "Cards",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CardTypes_Types_TypeId",
column: x => x.TypeId,
principalTable: "Types",
principalColumn: "TypeId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_CardCollections_UserId",
table: "CardCollections",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_CardPrintings_CardId_Lang",
table: "CardPrintings",
columns: new[] { "CardId", "Lang" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_CardPrintings_Name",
table: "CardPrintings",
column: "Name");
migrationBuilder.CreateIndex(
name: "IX_CardPrintings_OracleText",
table: "CardPrintings",
column: "OracleText");
migrationBuilder.CreateIndex(
name: "IX_Cards_CardName",
table: "Cards",
column: "CardName");
migrationBuilder.CreateIndex(
name: "IX_Cards_CollectorNumber_SetCode",
table: "Cards",
columns: new[] { "CollectorNumber", "SetCode" });
migrationBuilder.CreateIndex(
name: "IX_Cards_SetCode",
table: "Cards",
column: "SetCode");
migrationBuilder.CreateIndex(
name: "IX_Cards_SuperTypeId",
table: "Cards",
column: "SuperTypeId");
migrationBuilder.CreateIndex(
name: "IX_CardTypes_TypeId",
table: "CardTypes",
column: "TypeId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("DROP TABLE IF EXISTS CardPrintingsFTS;");
migrationBuilder.DropTable(
name: "CardCollections");
migrationBuilder.DropTable(
name: "CardPrintings");
migrationBuilder.DropTable(
name: "CardTypes");
migrationBuilder.DropTable(
name: "Cards");
migrationBuilder.DropTable(
name: "Types");
migrationBuilder.DropTable(
name: "Sets");
migrationBuilder.DropTable(
name: "Supertypes");
}
}
}
@@ -0,0 +1,338 @@
// <auto-generated />
using System;
using MTG_CollectionVerwaltung.Data.MTGCollection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MTG_CollectionVerwaltung.Data.Migrations.MTG
{
[DbContext(typeof(MTGContext))]
partial class MTGContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("CardName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<int>("Cmc")
.HasColumnType("INTEGER");
b.Property<string>("CollectorNumber")
.HasColumnType("TEXT");
b.Property<bool>("Foil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<string>("ManaCost")
.HasColumnType("TEXT");
b.Property<bool>("NonFoil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<string>("OtherFace")
.HasColumnType("TEXT");
b.Property<string>("Power")
.HasColumnType("TEXT");
b.Property<string>("Rarity")
.HasColumnType("TEXT");
b.Property<string>("SetCode")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property<int>("SuperTypeId")
.HasColumnType("INTEGER");
b.Property<string>("Toughness")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CardName");
b.HasIndex("SetCode");
b.HasIndex("SuperTypeId");
b.HasIndex("CollectorNumber", "SetCode");
b.ToTable("Cards");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardCollection", b =>
{
b.Property<string>("CardId")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.HasKey("CardId", "UserId");
b.HasIndex("UserId");
b.ToTable("CardCollections");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrinting", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CardId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("FlavorText")
.HasColumnType("TEXT");
b.Property<string>("ImageUriLarge")
.HasColumnType("TEXT");
b.Property<string>("ImageUriNormal")
.HasColumnType("TEXT");
b.Property<string>("ImageUriSmall")
.HasColumnType("TEXT");
b.Property<string>("Lang")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("OracleText")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("Id");
b.HasIndex("Name");
b.HasIndex("OracleText");
b.HasIndex("CardId", "Lang")
.IsUnique();
b.ToTable("CardPrintings");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrintingFts", b =>
{
b.Property<string>("CardId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FlavorText")
.HasColumnType("TEXT");
b.Property<string>("Lang")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("OracleText")
.HasColumnType("TEXT");
b.ToTable((string)null);
b.ToView(null, (string)null);
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardType", b =>
{
b.Property<string>("CardId")
.HasColumnType("TEXT");
b.Property<int>("TypeId")
.HasColumnType("INTEGER");
b.HasKey("CardId", "TypeId");
b.HasIndex("TypeId");
b.ToTable("CardTypes");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.MTGType", b =>
{
b.Property<int>("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("TypeEn")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("TypeId");
b.ToTable("Types");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Set", b =>
{
b.Property<string>("SetCode")
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property<int>("CardCount")
.HasColumnType("INTEGER");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("TEXT");
b.Property<string>("SetIcon")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SetName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<string>("SetType")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("SetCode");
b.ToTable("Sets");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Supertype", b =>
{
b.Property<int>("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("TypeEn")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("TypeId");
b.ToTable("Supertypes");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Set", "Set")
.WithMany("Cards")
.HasForeignKey("SetCode")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Supertype", "SuperType")
.WithMany()
.HasForeignKey("SuperTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Set");
b.Navigation("SuperType");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardCollection", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("Collections")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrinting", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("Printings")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardType", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("CardTypes")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.MTGType", "Type")
.WithMany()
.HasForeignKey("TypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
b.Navigation("Type");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.Navigation("CardTypes");
b.Navigation("Collections");
b.Navigation("Printings");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Set", b =>
{
b.Navigation("Cards");
});
#pragma warning restore 612, 618
}
}
}