// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using TaxPayer.Infrastructure.Persistence; #nullable disable namespace Back.Migrations { [DbContext(typeof(SqlDbContext))] [Migration("20240725100322_Promotion")] partial class Promotion { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.15") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Back.Data.Models.Promotion", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID")); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Satus") .HasColumnType("bit"); b.HasKey("ID"); b.ToTable("Promotions"); }); modelBuilder.Entity("Back.Data.Models.PromotionDetails", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID")); b.Property("APrice") .HasColumnType("decimal(18,2)"); b.Property("CreditAmount") .HasColumnType("int"); b.Property("PermissionID") .HasColumnType("int"); b.Property("PromotionID") .HasColumnType("int"); b.HasKey("ID"); b.HasIndex("PermissionID"); b.HasIndex("PromotionID"); b.ToTable("PromotionDetails"); }); #pragma warning restore 612, 618 } } }