222 lines
7.5 KiB
C#
222 lines
7.5 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using BeautySalonDatabaseImplement;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace BeautySalonDatabaseImplement.Migrations
|
|
{
|
|
[DbContext(typeof(BeautySalonDatabase))]
|
|
partial class BeautySalonDatabaseModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "7.0.5")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClientFIO")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Clients");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Master", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("MasterFIO")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<double>("Wage")
|
|
.HasColumnType("float");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Masters");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.MasterService", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("MasterId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("ServiceId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<double>("Wage")
|
|
.HasColumnType("float");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MasterId");
|
|
|
|
b.HasIndex("ServiceId");
|
|
|
|
b.ToTable("MasterServices");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<double>("Cost")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<string>("ServiceName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<double>("Time")
|
|
.HasColumnType("float");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Services");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Visit", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClientFIO")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("ClientId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("DateOfVisit")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("MasterFIO")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("MasterId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("ServiceId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ServiceName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<double>("Sum")
|
|
.HasColumnType("float");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
b.HasIndex("MasterId");
|
|
|
|
b.HasIndex("ServiceId");
|
|
|
|
b.ToTable("Visits");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.MasterService", b =>
|
|
{
|
|
b.HasOne("BeautySalonDatabaseImplement.Models.Master", "Master")
|
|
.WithMany("Services")
|
|
.HasForeignKey("MasterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
|
|
.WithMany("MasterServices")
|
|
.HasForeignKey("ServiceId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Master");
|
|
|
|
b.Navigation("Service");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Visit", b =>
|
|
{
|
|
b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client")
|
|
.WithMany()
|
|
.HasForeignKey("ClientId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("BeautySalonDatabaseImplement.Models.Master", "Master")
|
|
.WithMany("Visits")
|
|
.HasForeignKey("MasterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
|
|
.WithMany()
|
|
.HasForeignKey("ServiceId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Client");
|
|
|
|
b.Navigation("Master");
|
|
|
|
b.Navigation("Service");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Master", b =>
|
|
{
|
|
b.Navigation("Services");
|
|
|
|
b.Navigation("Visits");
|
|
});
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
|
|
{
|
|
b.Navigation("MasterServices");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|