Create initial migration

This commit is contained in:
ShabOl 2024-05-15 21:15:39 +04:00
parent ace7c9d1c0
commit 822b5218a4
6 changed files with 16 additions and 8 deletions

View File

@ -12,7 +12,7 @@ using SushiBarDatabaseImplement;
namespace SushiBarDatabaseImplement.Migrations
{
[DbContext(typeof(SushiBarDatabase))]
[Migration("20240515165005_Initial")]
[Migration("20240515171525_Initial")]
partial class Initial
{
/// <inheritdoc />
@ -113,7 +113,7 @@ namespace SushiBarDatabaseImplement.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("BirthdayDate")
b.Property<DateTime?>("BirthdayDate")
.HasColumnType("timestamp without time zone");
b.Property<string>("Fio")

View File

@ -33,7 +33,7 @@ namespace SushiBarDatabaseImplement.Migrations
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Fio = table.Column<string>(type: "text", nullable: false),
BirthdayDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
BirthdayDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
SumOfAllOrders = table.Column<double>(type: "double precision", nullable: false)
},
constraints: table =>

View File

@ -110,7 +110,7 @@ namespace SushiBarDatabaseImplement.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("BirthdayDate")
b.Property<DateTime?>("BirthdayDate")
.HasColumnType("timestamp without time zone");
b.Property<string>("Fio")

View File

@ -11,8 +11,7 @@ namespace SushiBarDatabaseImplement.Models
[Required]
public string Fio { get; set; } = string.Empty;
[Required]
public DateTime BirthdayDate { get; set; }
public DateTime? BirthdayDate { get; set; }
[Required]
public double SumOfAllOrders { get; set; }

View File

@ -1,7 +1,12 @@
namespace SushiBarDatabaseImplement.Storages
using SushiBarContracts.ViewModels;
namespace SushiBarDatabaseImplement.Storages
{
public class IngredientStorage
{
public List<>
public List<IngredientViewModel> GetFullList()
{
return new List<IngredientViewModel>();
}
}
}

View File

@ -16,4 +16,8 @@
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.18" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SushiBarContracts\SushiBarContracts.csproj" />
</ItemGroup>
</Project>