db + migrations

This commit is contained in:
Aleksandr Popov
2023-06-25 18:33:44 +02:00
parent 944712df97
commit 34acef713d
14 changed files with 255 additions and 172 deletions
@@ -0,0 +1,50 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using TURN.Services.Chess.DBModel;
#nullable disable
namespace TURN.Services.Chess.Migrations
{
[DbContext(typeof(ModelBaseContext))]
partial class ModelBaseContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("TURN.Services.Chess.DBModel.Game", b =>
{
b.Property<long?>("GameId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasColumnName("GameId");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("GameId"));
b.Property<string>("BlackUserName")
.HasColumnType("text");
b.Property<string>("StartDate")
.HasColumnType("text");
b.Property<string>("WhiteUserName")
.HasColumnType("text");
b.HasKey("GameId");
b.ToTable("Games");
});
#pragma warning restore 612, 618
}
}
}