//
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("20250125170646_cdt")]
partial class cdt
{
///
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.BillType", b =>
{
b.Property("ID")
.HasColumnType("int");
b.Property("Dec")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("inty")
.HasColumnType("int");
b.HasKey("ID");
b.ToTable("BillTypes");
});
modelBuilder.Entity("Back.Data.Models.Blog", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Date")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("DescriptionTag")
.HasColumnType("nvarchar(max)");
b.Property("PageTitle")
.HasColumnType("nvarchar(max)");
b.Property("Photo")
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("bit");
b.Property("Tags")
.HasColumnType("nvarchar(max)");
b.Property("Text")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Time")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("keywordsTag")
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("Blogs");
});
modelBuilder.Entity("Back.Data.Models.CODItem", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CompanyID")
.HasColumnType("int");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("ItemTaxID")
.HasMaxLength(13)
.HasColumnType("nvarchar(13)");
b.Property("TaxRate")
.HasColumnType("int");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("UnitID")
.HasColumnType("int");
b.HasKey("ID");
b.HasIndex("CompanyID");
b.HasIndex("UnitID");
b.ToTable("CODItems");
});
modelBuilder.Entity("Back.Data.Models.CODUnit", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("UnitTaxID")
.HasMaxLength(8)
.HasColumnType("nvarchar(8)");
b.HasKey("ID");
b.ToTable("CODUnits");
});
modelBuilder.Entity("Back.Data.Models.CalculationType", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("CalculationTypes");
});
modelBuilder.Entity("Back.Data.Models.Coding", b =>
{
b.Property("FildID")
.HasColumnType("int");
b.Property("Code")
.HasColumnType("varchar(10)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("FildID", "Code");
b.ToTable("Codings");
});
modelBuilder.Entity("Back.Data.Models.Company", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("BranchID")
.HasColumnType("nvarchar(max)");
b.Property("Credit")
.HasColumnType("decimal(18,2)");
b.Property("EconomicCode")
.HasColumnType("nvarchar(max)");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("IsActive")
.HasColumnType("bit");
b.Property("Logo")
.HasColumnType("varbinary(max)");
b.Property("Mobile")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("PrivateKey")
.HasColumnType("nvarchar(max)");
b.Property("RegisterDate")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("UniqeMemory")
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("Companies");
});
modelBuilder.Entity("Back.Data.Models.CreditDocuments", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CompanyID")
.HasColumnType("int");
b.Property("Date")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Value")
.HasColumnType("decimal(18,2)");
b.Property("type")
.HasColumnType("int");
b.HasKey("ID");
b.HasIndex("CompanyID");
b.ToTable("CreditDocuments");
});
modelBuilder.Entity("Back.Data.Models.Customer", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Address")
.HasColumnType("nvarchar(max)");
b.Property("BranchID")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property("CompanyID")
.HasColumnType("int");
b.Property("CustomerType")
.HasColumnType("int");
b.Property("EconomicCode")
.HasColumnType("nvarchar(max)");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("FullName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Info")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("MeliCode")
.HasMaxLength(14)
.HasColumnType("nvarchar(14)");
b.Property("PassportNumber")
.HasMaxLength(9)
.HasColumnType("nvarchar(9)");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("ZipCode")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.HasKey("ID");
b.HasIndex("CompanyID");
b.ToTable("Customers");
});
modelBuilder.Entity("Back.Data.Models.Fild", b =>
{
b.Property("ID")
.HasColumnType("int");
b.Property("InputBox")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Type")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("Filds");
});
modelBuilder.Entity("Back.Data.Models.FildMode", b =>
{
b.Property("ID")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("FildModes");
});
modelBuilder.Entity("Back.Data.Models.FildModeInPattern", b =>
{
b.Property("FildID")
.HasColumnType("int");
b.Property("PatternID")
.HasColumnType("int");
b.Property("FildModeID")
.HasColumnType("int");
b.HasKey("FildID", "PatternID", "FildModeID");
b.HasIndex("FildModeID");
b.HasIndex("PatternID");
b.ToTable("FildModeInPattern");
});
modelBuilder.Entity("Back.Data.Models.Invoice", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("BillReference")
.HasColumnType("int");
b.Property("Cdate")
.HasColumnType("nvarchar(max)");
b.Property("CompanyID")
.HasColumnType("int");
b.Property("CottageDateOfCustomsDeclaration")
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property("CustomerID")
.HasColumnType("int");
b.Property("DateSaleAnnouncement")
.HasColumnType("nvarchar(max)");
b.Property("Des")
.HasColumnType("nvarchar(max)");
b.Property("InvoicIssueDate")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("InvoiceDate")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastChangeUserID")
.HasColumnType("int");
b.Property("PatternID")
.HasColumnType("int");
b.Property("PreparedtoSendtoTax")
.HasColumnType("bit");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Udate")
.HasColumnType("nvarchar(max)");
b.Property("asn")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("billid")
.HasMaxLength(19)
.HasColumnType("nvarchar(19)");
b.Property("cdcn")
.HasMaxLength(14)
.HasColumnType("nvarchar(14)");
b.Property("cno")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("crn")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b.Property("dci")
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property("dco")
.HasMaxLength(3)
.HasColumnType("nvarchar(3)");
b.Property("did")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b.Property("ft")
.HasMaxLength(9)
.HasColumnType("int");
b.Property("inno")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property("ino")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("insp")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("invoiceType")
.HasColumnType("int");
b.Property("irno")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("irtaxid")
.HasMaxLength(22)
.HasColumnType("nvarchar(22)");
b.Property("lt")
.HasColumnType("int");
b.Property("oci")
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property("ocu")
.HasMaxLength(3)
.HasColumnType("nvarchar(3)");
b.Property("rid")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b.Property("scc")
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property("scln")
.HasMaxLength(14)
.HasColumnType("nvarchar(14)");
b.Property("setm")
.HasMaxLength(1)
.HasColumnType("int");
b.Property("seventeentax")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("taxid")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("tid")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b.Property("tinc")
.HasMaxLength(14)
.HasColumnType("nvarchar(14)");
b.HasKey("ID");
b.HasIndex("BillReference");
b.HasIndex("CompanyID");
b.HasIndex("CustomerID");
b.HasIndex("LastChangeUserID");
b.HasIndex("PatternID");
b.ToTable("Invoices");
});
modelBuilder.Entity("Back.Data.Models.InvoiceItem", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CODID")
.HasColumnType("int");
b.Property("InvoiceID")
.HasColumnType("int");
b.Property("_cfee")
.HasColumnType("decimal(18,2)");
b.Property("am")
.HasMaxLength(36)
.HasColumnType("decimal(18,2)");
b.Property("bros")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("bsrn")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b.Property("consfee")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("cpr")
.HasColumnType("decimal(18,2)");
b.Property("cui")
.HasColumnType("decimal(18,2)");
b.Property("cut")
.HasMaxLength(4)
.HasColumnType("nvarchar(4)");
b.Property("dis")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("exr")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("fee")
.HasMaxLength(36)
.HasColumnType("decimal(18,2)");
b.Property("nw")
.HasMaxLength(23)
.HasColumnType("decimal(18,2)");
b.Property("odam")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("odr")
.HasMaxLength(5)
.HasColumnType("decimal(18,2)");
b.Property("odt")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.Property("olam")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("olr")
.HasMaxLength(5)
.HasColumnType("decimal(18,2)");
b.Property("olt")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.Property("pspd")
.HasColumnType("decimal(18,2)");
b.Property("sovat")
.HasColumnType("bigint");
b.Property("spro")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("sscv")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("ssrv")
.HasMaxLength(18)
.HasColumnType("decimal(18,2)");
b.Property("vra")
.HasMaxLength(5)
.HasColumnType("decimal(18,2)");
b.HasKey("ID");
b.HasIndex("CODID");
b.HasIndex("InvoiceID");
b.ToTable("InvoiceItems");
});
modelBuilder.Entity("Back.Data.Models.InvoicePayment", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("InvoiceID")
.HasColumnType("int");
b.Property("PaymentDateTime")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("acn")
.HasMaxLength(14)
.HasColumnType("nvarchar(14)");
b.Property("iinn")
.HasMaxLength(9)
.HasColumnType("nvarchar(9)");
b.Property("pcn")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)");
b.Property("pid")
.HasMaxLength(12)
.HasColumnType("nvarchar(12)");
b.Property("pmt")
.HasMaxLength(2)
.HasColumnType("int");
b.Property("pv")
.HasMaxLength(18)
.HasColumnType("bigint");
b.Property("trmn")
.HasMaxLength(8)
.HasColumnType("nvarchar(8)");
b.Property("trn")
.HasMaxLength(14)
.HasColumnType("nvarchar(14)");
b.HasKey("ID");
b.HasIndex("InvoiceID");
b.ToTable("InvoicePayments");
});
modelBuilder.Entity("Back.Data.Models.InvoiceStatusChang", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Date")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("FromStatus")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("InvoiceID")
.HasColumnType("int");
b.Property("ToStatus")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("UserID")
.HasColumnType("int");
b.HasKey("ID");
b.HasIndex("InvoiceID");
b.HasIndex("UserID");
b.ToTable("InvoiceStatusChangs");
});
modelBuilder.Entity("Back.Data.Models.Notification", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Date")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("ForUser")
.HasColumnType("nvarchar(max)");
b.Property("Message")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("int");
b.HasKey("ID");
b.ToTable("Notifications");
});
modelBuilder.Entity("Back.Data.Models.Order", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("ApprovalDate")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CompanyID")
.HasColumnType("int");
b.Property("DateCreate")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("int");
b.Property("TDiscount")
.HasColumnType("decimal(18,2)");
b.Property("UserID")
.HasColumnType("int");
b.HasKey("ID");
b.HasIndex("CompanyID");
b.HasIndex("UserID");
b.ToTable("Orders");
});
modelBuilder.Entity("Back.Data.Models.OrderDiscountCode", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Code")
.HasColumnType("int");
b.Property("Status")
.HasColumnType("bit");
b.Property("Val")
.HasColumnType("int");
b.HasKey("ID");
b.ToTable("OrderDiscountCodes");
});
modelBuilder.Entity("Back.Data.Models.OrderItem", 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("Discount")
.HasColumnType("decimal(18,2)");
b.Property("OrderID")
.HasColumnType("int");
b.Property("PermissionID")
.HasColumnType("int");
b.Property("PromotionID")
.HasColumnType("int");
b.Property("Tax")
.HasColumnType("decimal(18,2)");
b.HasKey("ID");
b.HasIndex("OrderID");
b.HasIndex("PermissionID");
b.HasIndex("PromotionID");
b.ToTable("OrderItems");
});
modelBuilder.Entity("Back.Data.Models.Pattern", b =>
{
b.Property("ID")
.HasColumnType("int");
b.Property("BillTypeID")
.HasColumnType("int");
b.Property("Dec")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("bit");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("inp")
.HasColumnType("int");
b.HasKey("ID");
b.HasIndex("BillTypeID");
b.ToTable("Patterns");
});
modelBuilder.Entity("Back.Data.Models.Permission", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("ParentID")
.HasColumnType("int");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("Permissions");
});
modelBuilder.Entity("Back.Data.Models.PermissionPeriod", b =>
{
b.Property("CompanyID")
.HasColumnType("int");
b.Property("PermissionID")
.HasColumnType("int");
b.Property("CalculationTypeID")
.HasColumnType("int");
b.Property("IsLocked")
.HasColumnType("bit");
b.Property("RemainingAmount")
.HasColumnType("int");
b.Property("TotalAmount")
.HasColumnType("int");
b.HasKey("CompanyID", "PermissionID", "CalculationTypeID");
b.HasIndex("CalculationTypeID");
b.HasIndex("PermissionID");
b.ToTable("PermissionPeriods");
});
modelBuilder.Entity("Back.Data.Models.PermissionUser", b =>
{
b.Property("PermissionID")
.HasColumnType("int");
b.Property("RolUserID")
.HasColumnType("int");
b.HasKey("PermissionID", "RolUserID");
b.HasIndex("RolUserID");
b.ToTable("PermissionUsers");
});
modelBuilder.Entity("Back.Data.Models.Pricing", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CalculationTypeID")
.HasColumnType("int");
b.Property("PermissionID")
.HasColumnType("int");
b.Property("Price")
.HasColumnType("decimal(18,2)");
b.HasKey("ID");
b.HasIndex("CalculationTypeID");
b.HasIndex("PermissionID");
b.ToTable("Pricing");
});
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("Status")
.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");
});
modelBuilder.Entity("Back.Data.Models.Question", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Answer")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("QuestionCategoryID")
.HasColumnType("int");
b.Property("Status")
.HasColumnType("bit");
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.HasIndex("QuestionCategoryID");
b.ToTable("Questions");
});
modelBuilder.Entity("Back.Data.Models.QuestionCategory", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("QuestionCategories");
});
modelBuilder.Entity("Back.Data.Models.RolUser", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("CompanyID")
.HasColumnType("int");
b.Property("IsAdmin")
.HasColumnType("bit");
b.Property("UserID")
.HasColumnType("int");
b.HasKey("ID");
b.HasIndex("CompanyID");
b.HasIndex("UserID");
b.ToTable("RolUsers");
});
modelBuilder.Entity("Back.Data.Models.SaleLead", b =>
{
b.Property("ID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
b.Property("Key")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Mobile")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("cn")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("company")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property