Add migration to add Match and League entities.

This commit is contained in:
Kevin Matsubara 2025-04-06 20:06:01 +02:00
parent a49717ff49
commit f137595a5a
4 changed files with 838 additions and 19 deletions

View File

@ -0,0 +1,282 @@
// <auto-generated />
using System;
using EntityFrameworkCore.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace EntityFrameworkCore.Data.Migrations
{
[DbContext(typeof(DeadBallZoneLeagueDbContext))]
[Migration("20250406180432_AddMatchAndLeagueEntities")]
partial class AddMatchAndLeagueEntities
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.3");
modelBuilder.Entity("EntityFrameworkCore.Domain.Coach", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Coaches");
});
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Leagues");
});
modelBuilder.Entity("EntityFrameworkCore.Domain.Match", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("AwayTeamId")
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<DateTime>("Date")
.HasColumnType("TEXT");
b.Property<int>("HomeTeamId")
.HasColumnType("INTEGER");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<decimal>("TicketPrice")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Matches");
});
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("CoachId")
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<int>("LeagueId")
.HasColumnType("INTEGER");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<int?>("TeamId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Teams");
b.HasData(
new
{
Id = 1,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Delhi"
},
new
{
Id = 2,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Voodoo"
},
new
{
Id = 3,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Penal X"
},
new
{
Id = 4,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Tokyo"
},
new
{
Id = 5,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Barcelona"
},
new
{
Id = 6,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Manchester"
},
new
{
Id = 7,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Bangkok"
},
new
{
Id = 8,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Amsterdam"
},
new
{
Id = 9,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Killaklowns"
},
new
{
Id = 10,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Sol"
},
new
{
Id = 11,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "DEC"
},
new
{
Id = 12,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Leopards"
},
new
{
Id = 13,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Harlequins"
},
new
{
Id = 14,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Gladiators"
},
new
{
Id = 15,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Fiz-O"
});
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,406 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace EntityFrameworkCore.Data.Migrations
{
/// <inheritdoc />
public partial class AddMatchAndLeagueEntities : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Teams",
table: "Teams");
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 4);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 5);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 6);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 7);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 8);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 9);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 10);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 11);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 12);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 13);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 14);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "TeamId",
keyValue: 15);
migrationBuilder.AlterColumn<int>(
name: "TeamId",
table: "Teams",
type: "INTEGER",
nullable: true,
oldClrType: typeof(int),
oldType: "INTEGER")
.OldAnnotation("Sqlite:Autoincrement", true);
migrationBuilder.AddColumn<int>(
name: "Id",
table: "Teams",
type: "INTEGER",
nullable: false,
defaultValue: 0)
.Annotation("Sqlite:Autoincrement", true);
migrationBuilder.AddColumn<int>(
name: "CoachId",
table: "Teams",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "CreatedBy",
table: "Teams",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "LeagueId",
table: "Teams",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "ModifiedBy",
table: "Teams",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "ModifiedDate",
table: "Teams",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CreatedBy",
table: "Coaches",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ModifiedBy",
table: "Coaches",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "ModifiedDate",
table: "Coaches",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddPrimaryKey(
name: "PK_Teams",
table: "Teams",
column: "Id");
migrationBuilder.CreateTable(
name: "Leagues",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
CreatedDate = table.Column<DateTime>(type: "TEXT", nullable: false),
ModifiedDate = table.Column<DateTime>(type: "TEXT", nullable: false),
CreatedBy = table.Column<string>(type: "TEXT", nullable: true),
ModifiedBy = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Leagues", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Matches",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
HomeTeamId = table.Column<int>(type: "INTEGER", nullable: false),
AwayTeamId = table.Column<int>(type: "INTEGER", nullable: false),
TicketPrice = table.Column<decimal>(type: "TEXT", nullable: false),
Date = table.Column<DateTime>(type: "TEXT", nullable: false),
CreatedDate = table.Column<DateTime>(type: "TEXT", nullable: false),
ModifiedDate = table.Column<DateTime>(type: "TEXT", nullable: false),
CreatedBy = table.Column<string>(type: "TEXT", nullable: true),
ModifiedBy = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Matches", x => x.Id);
});
migrationBuilder.InsertData(
table: "Teams",
columns: new[] { "Id", "CoachId", "CreatedBy", "CreatedDate", "LeagueId", "ModifiedBy", "ModifiedDate", "Name", "TeamId" },
values: new object[,]
{
{ 1, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Neo Delhi", null },
{ 2, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Voodoo", null },
{ 3, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Penal X", null },
{ 4, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Neo Tokyo", null },
{ 5, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Neo Barcelona", null },
{ 6, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Neo Manchester", null },
{ 7, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Neo Bangkok", null },
{ 8, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Neo Amsterdam", null },
{ 9, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Killaklowns", null },
{ 10, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Sol", null },
{ 11, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "DEC", null },
{ 12, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Leopards", null },
{ 13, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Harlequins", null },
{ 14, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Gladiators", null },
{ 15, 0, null, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), 0, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Fiz-O", null }
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Leagues");
migrationBuilder.DropTable(
name: "Matches");
migrationBuilder.DropPrimaryKey(
name: "PK_Teams",
table: "Teams");
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 4);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 5);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 6);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 7);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 8);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 9);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 10);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 11);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 12);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 13);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 14);
migrationBuilder.DeleteData(
table: "Teams",
keyColumn: "Id",
keyColumnType: "INTEGER",
keyValue: 15);
migrationBuilder.DropColumn(
name: "Id",
table: "Teams");
migrationBuilder.DropColumn(
name: "CoachId",
table: "Teams");
migrationBuilder.DropColumn(
name: "CreatedBy",
table: "Teams");
migrationBuilder.DropColumn(
name: "LeagueId",
table: "Teams");
migrationBuilder.DropColumn(
name: "ModifiedBy",
table: "Teams");
migrationBuilder.DropColumn(
name: "ModifiedDate",
table: "Teams");
migrationBuilder.DropColumn(
name: "CreatedBy",
table: "Coaches");
migrationBuilder.DropColumn(
name: "ModifiedBy",
table: "Coaches");
migrationBuilder.DropColumn(
name: "ModifiedDate",
table: "Coaches");
migrationBuilder.AlterColumn<int>(
name: "TeamId",
table: "Teams",
type: "INTEGER",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "INTEGER",
oldNullable: true)
.Annotation("Sqlite:Autoincrement", true);
migrationBuilder.AddPrimaryKey(
name: "PK_Teams",
table: "Teams",
column: "TeamId");
migrationBuilder.InsertData(
table: "Teams",
columns: new[] { "TeamId", "CreatedDate", "Name" },
values: new object[,]
{
{ 1, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Neo Delhi" },
{ 2, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Voodoo" },
{ 3, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Penal X" },
{ 4, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Neo Tokyo" },
{ 5, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Neo Barcelona" },
{ 6, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Neo Manchester" },
{ 7, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Neo Bangkok" },
{ 8, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Neo Amsterdam" },
{ 9, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Killaklowns" },
{ 10, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Sol" },
{ 11, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "DEC" },
{ 12, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Leopards" },
{ 13, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Harlequins" },
{ 14, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Gladiators" },
{ 15, new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), "Fiz-O" }
});
}
}
}

View File

@ -23,123 +23,253 @@ namespace EntityFrameworkCore.Data.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate") b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("Coaches", (string)null); b.ToTable("Coaches");
});
modelBuilder.Entity("EntityFrameworkCore.Domain.League", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Leagues");
});
modelBuilder.Entity("EntityFrameworkCore.Domain.Match", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("AwayTeamId")
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT");
b.Property<DateTime>("Date")
.HasColumnType("TEXT");
b.Property<int>("HomeTeamId")
.HasColumnType("INTEGER");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<decimal>("TicketPrice")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Matches");
}); });
modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b => modelBuilder.Entity("EntityFrameworkCore.Domain.Team", b =>
{ {
b.Property<int>("TeamId") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");
b.Property<int>("CoachId")
.HasColumnType("INTEGER");
b.Property<string>("CreatedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedDate") b.Property<DateTime>("CreatedDate")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<int>("LeagueId")
.HasColumnType("INTEGER");
b.Property<string>("ModifiedBy")
.HasColumnType("TEXT");
b.Property<DateTime>("ModifiedDate")
.HasColumnType("TEXT");
b.Property<string>("Name") b.Property<string>("Name")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.HasKey("TeamId"); b.Property<int?>("TeamId")
.HasColumnType("INTEGER");
b.ToTable("Teams", (string)null); b.HasKey("Id");
b.ToTable("Teams");
b.HasData( b.HasData(
new new
{ {
TeamId = 1, Id = 1,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Delhi" Name = "Neo Delhi"
}, },
new new
{ {
TeamId = 2, Id = 2,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Voodoo" Name = "Voodoo"
}, },
new new
{ {
TeamId = 3, Id = 3,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Penal X" Name = "Penal X"
}, },
new new
{ {
TeamId = 4, Id = 4,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Tokyo" Name = "Neo Tokyo"
}, },
new new
{ {
TeamId = 5, Id = 5,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Barcelona" Name = "Neo Barcelona"
}, },
new new
{ {
TeamId = 6, Id = 6,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Manchester" Name = "Neo Manchester"
}, },
new new
{ {
TeamId = 7, Id = 7,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Bangkok" Name = "Neo Bangkok"
}, },
new new
{ {
TeamId = 8, Id = 8,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Neo Amsterdam" Name = "Neo Amsterdam"
}, },
new new
{ {
TeamId = 9, Id = 9,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Killaklowns" Name = "Killaklowns"
}, },
new new
{ {
TeamId = 10, Id = 10,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Sol" Name = "Sol"
}, },
new new
{ {
TeamId = 11, Id = 11,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "DEC" Name = "DEC"
}, },
new new
{ {
TeamId = 12, Id = 12,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Leopards" Name = "Leopards"
}, },
new new
{ {
TeamId = 13, Id = 13,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Harlequins" Name = "Harlequins"
}, },
new new
{ {
TeamId = 14, Id = 14,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Gladiators" Name = "Gladiators"
}, },
new new
{ {
TeamId = 15, Id = 15,
CoachId = 0,
CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified), CreatedDate = new DateTime(2025, 4, 4, 17, 7, 27, 33, DateTimeKind.Unspecified),
LeagueId = 0,
ModifiedDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Fiz-O" Name = "Fiz-O"
}); });
}); });

View File

@ -3,6 +3,7 @@
public class Team : BaseDomainModel public class Team : BaseDomainModel
{ {
public string? Name { get; set; } public string? Name { get; set; }
public int? TeamId { get; set; }
public int LeagueId { get; set; } public int LeagueId { get; set; }
public int CoachId { get; set; } public int CoachId { get; set; }
} }