2023-05-13 23:36:15 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using BeautySalonDatabaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
2023-05-17 02:04:30 +04:00
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
#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")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("ClientFIO")
|
|
|
|
|
.IsRequired()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("text");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
|
|
|
.IsRequired()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("text");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Clients");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Master", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("MasterFIO")
|
|
|
|
|
.IsRequired()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("text");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Wage")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("double precision");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Masters");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.MasterService", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("MasterId")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("ServiceId")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Wage")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("double precision");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("MasterId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ServiceId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("MasterServices");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("double precision");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("ServiceName")
|
|
|
|
|
.IsRequired()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("text");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Time")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("double precision");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Services");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Visit", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("ClientFIO")
|
|
|
|
|
.IsRequired()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("text");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("ClientId")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateOfVisit")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("timestamp with time zone");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
b.Property<int?>("MasterId")
|
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("ServiceId")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("integer");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("ServiceName")
|
|
|
|
|
.IsRequired()
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("text");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Sum")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasColumnType("double precision");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
2023-05-17 02:04:30 +04:00
|
|
|
|
b.HasOne("BeautySalonDatabaseImplement.Models.Master", null)
|
2023-05-13 23:36:15 +04:00
|
|
|
|
.WithMany("Visits")
|
2023-05-17 02:04:30 +04:00
|
|
|
|
.HasForeignKey("MasterId");
|
2023-05-13 23:36:15 +04:00
|
|
|
|
|
|
|
|
|
b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ServiceId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Client");
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|