Add project
All checks were successful
SanStudent Multi-Project Deployment / deploy-api (push) Successful in 41s
SanStudent Multi-Project Deployment / deploy-frontadmin (push) Successful in 41s
SanStudent Multi-Project Deployment / deploy-frontstudent (push) Successful in 40s

This commit is contained in:
aherman-san
2026-03-07 11:14:26 +01:00
parent bca807d4c1
commit b8f03bf6d3
191 changed files with 122377 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
// <auto-generated />
using System;
using Api.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Api.Database.Migrations
{
[DbContext(typeof(SanStudentContext))]
[Migration("20260301222003_CreateDb")]
partial class CreateDb
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Api.Database.Entities.Student", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier")
.HasColumnName("Id");
b.Property<string>("AlbumNumber")
.IsRequired()
.HasMaxLength(6)
.HasColumnType("nvarchar(6)")
.HasColumnName("AlbumNumber");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2")
.HasColumnName("CreatedAt");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("FirstName");
b.Property<DateTime>("LastModifiedAt")
.HasColumnType("datetime2")
.HasColumnName("LastModifiedAt");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("LastName");
b.HasKey("Id");
b.HasIndex("AlbumNumber")
.IsUnique();
b.ToTable("Students");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,44 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Api.Database.Migrations
{
/// <inheritdoc />
public partial class CreateDb : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Students",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
FirstName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
LastName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
AlbumNumber = table.Column<string>(type: "nvarchar(6)", maxLength: 6, nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
LastModifiedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Students", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_Students_AlbumNumber",
table: "Students",
column: "AlbumNumber",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Students");
}
}
}

View File

@@ -0,0 +1,150 @@
// <auto-generated />
using System;
using Api.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Api.Database.Migrations
{
[DbContext(typeof(SanStudentContext))]
[Migration("20260305195643_SpecsSubjectsAndSeasons")]
partial class SpecsSubjectsAndSeasons
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Api.Database.Entities.Season", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("Id");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<DateOnly>("EndDate")
.HasColumnType("date")
.HasColumnName("EndDate");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasColumnName("Name");
b.Property<DateOnly>("StartDate")
.HasColumnType("date")
.HasColumnName("StartDate");
b.HasKey("Id");
b.ToTable("Seasons");
});
modelBuilder.Entity("Api.Database.Entities.Specialization", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("Id");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasColumnName("Name");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("nvarchar(10)")
.HasColumnName("ShortName");
b.HasKey("Id");
b.ToTable("Specializations");
});
modelBuilder.Entity("Api.Database.Entities.Student", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier")
.HasColumnName("Id");
b.Property<string>("AlbumNumber")
.IsRequired()
.HasMaxLength(6)
.HasColumnType("nvarchar(6)")
.HasColumnName("AlbumNumber");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2")
.HasColumnName("CreatedAt");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("FirstName");
b.Property<DateTime>("LastModifiedAt")
.HasColumnType("datetime2")
.HasColumnName("LastModifiedAt");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("LastName");
b.HasKey("Id");
b.HasIndex("AlbumNumber")
.IsUnique();
b.ToTable("Students");
});
modelBuilder.Entity("Api.Database.Entities.Subject", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("Id");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasColumnName("Name");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("nvarchar(10)")
.HasColumnName("ShortName");
b.HasKey("Id");
b.ToTable("Subjects");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,71 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Api.Database.Migrations
{
/// <inheritdoc />
public partial class SpecsSubjectsAndSeasons : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Seasons",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
StartDate = table.Column<DateOnly>(type: "date", nullable: false),
EndDate = table.Column<DateOnly>(type: "date", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Seasons", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Specializations",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
ShortName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Specializations", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Subjects",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
ShortName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Subjects", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Seasons");
migrationBuilder.DropTable(
name: "Specializations");
migrationBuilder.DropTable(
name: "Subjects");
}
}
}

View File

@@ -0,0 +1,147 @@
// <auto-generated />
using System;
using Api.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Api.Database.Migrations
{
[DbContext(typeof(SanStudentContext))]
partial class SanStudentContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Api.Database.Entities.Season", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("Id");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<DateOnly>("EndDate")
.HasColumnType("date")
.HasColumnName("EndDate");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasColumnName("Name");
b.Property<DateOnly>("StartDate")
.HasColumnType("date")
.HasColumnName("StartDate");
b.HasKey("Id");
b.ToTable("Seasons");
});
modelBuilder.Entity("Api.Database.Entities.Specialization", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("Id");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasColumnName("Name");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("nvarchar(10)")
.HasColumnName("ShortName");
b.HasKey("Id");
b.ToTable("Specializations");
});
modelBuilder.Entity("Api.Database.Entities.Student", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier")
.HasColumnName("Id");
b.Property<string>("AlbumNumber")
.IsRequired()
.HasMaxLength(6)
.HasColumnType("nvarchar(6)")
.HasColumnName("AlbumNumber");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime2")
.HasColumnName("CreatedAt");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("FirstName");
b.Property<DateTime>("LastModifiedAt")
.HasColumnType("datetime2")
.HasColumnName("LastModifiedAt");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("LastName");
b.HasKey("Id");
b.HasIndex("AlbumNumber")
.IsUnique();
b.ToTable("Students");
});
modelBuilder.Entity("Api.Database.Entities.Subject", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("Id");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasColumnName("Name");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("nvarchar(10)")
.HasColumnName("ShortName");
b.HasKey("Id");
b.ToTable("Subjects");
});
#pragma warning restore 612, 618
}
}
}