194 lines
6.5 KiB
C#
194 lines
6.5 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
using ServiceStationsDataBaseImplement;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace ServiceStationsDataBaseImplement.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(Database))]
|
|||
|
[Migration("20240820063305_InitMigration")]
|
|||
|
partial class InitMigration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "7.0.18")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|||
|
|
|||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.Client", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("FIO")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Login")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Password")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Clients");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.Executor", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Email")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("FIO")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Password")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Executors");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.TaskByWork", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Tasks");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.Work", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<DateTime>("Date")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("ExecutorId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<double>("Price")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.Property<int>("TaskId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ExecutorId");
|
|||
|
|
|||
|
b.ToTable("Works");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.WorkClient", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("ClientId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("PointCount")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("WorkId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ClientId");
|
|||
|
|
|||
|
b.HasIndex("WorkId");
|
|||
|
|
|||
|
b.ToTable("WorksClients");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.Work", b =>
|
|||
|
{
|
|||
|
b.HasOne("ServiceStationsDataBaseImplement.Models.Executor", null)
|
|||
|
.WithMany("Works")
|
|||
|
.HasForeignKey("ExecutorId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.WorkClient", b =>
|
|||
|
{
|
|||
|
b.HasOne("ServiceStationsDataBaseImplement.Models.Client", "_client")
|
|||
|
.WithMany("WorkClients")
|
|||
|
.HasForeignKey("ClientId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("ServiceStationsDataBaseImplement.Models.Work", "_work")
|
|||
|
.WithMany("WorkClients")
|
|||
|
.HasForeignKey("WorkId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("_client");
|
|||
|
|
|||
|
b.Navigation("_work");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.Client", b =>
|
|||
|
{
|
|||
|
b.Navigation("WorkClients");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.Executor", b =>
|
|||
|
{
|
|||
|
b.Navigation("Works");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("ServiceStationsDataBaseImplement.Models.Work", b =>
|
|||
|
{
|
|||
|
b.Navigation("WorkClients");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|