2024-03-30 15:10:36 +03:30
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Back.Data.Models;
|
|
|
|
|
|
|
|
|
|
namespace TaxPayer.Infrastructure.Persistence
|
|
|
|
|
{
|
|
|
|
|
public class SqlDbContext : DbContext
|
|
|
|
|
{
|
|
|
|
|
public SqlDbContext(DbContextOptions<SqlDbContext> options) : base(options)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
#region Table
|
|
|
|
|
public DbSet<BillType> BillTypes { get; set; }
|
|
|
|
|
public DbSet<Fild> Filds { get; set; }
|
|
|
|
|
public DbSet<FildMode> FildModes { get; set; }
|
|
|
|
|
public DbSet<FildModeInPattern> FildModeInPattern { get; set; }
|
|
|
|
|
public DbSet<Pattern> Patterns { get; set; }
|
|
|
|
|
public DbSet<Coding> Codings { get; set; }
|
|
|
|
|
public DbSet<SpecialCondition> SpecialConditions { get; set; }
|
|
|
|
|
public DbSet<Company> Companies { get; set; }
|
|
|
|
|
public DbSet<User> Users { get; set; }
|
|
|
|
|
public DbSet<CalculationType> CalculationTypes { get; set; }
|
|
|
|
|
public DbSet<Permission> Permissions { get; set; }
|
|
|
|
|
public DbSet<PermissionPeriod> PermissionPeriods { get; set; }
|
|
|
|
|
public DbSet<RolUser> RolUsers { get; set; }
|
|
|
|
|
public DbSet<Customer> Customers { get; set; }
|
|
|
|
|
public DbSet<CODUnit> CODUnits { get; set; }
|
|
|
|
|
public DbSet<CODItem> CODItems { get; set; }
|
|
|
|
|
public DbSet<Invoice> Invoices { get; set; }
|
|
|
|
|
public DbSet<InvoiceItem> InvoiceItems { get; set; }
|
|
|
|
|
public DbSet<InvoicePayment> InvoicePayments { get; set; }
|
|
|
|
|
public DbSet<PermissionUser> PermissionUsers { get; set; }
|
|
|
|
|
public DbSet<InvoiceStatusChang> InvoiceStatusChangs { get; set; }
|
|
|
|
|
public DbSet<VerificationCode> VerificationCodes { get; set; }
|
|
|
|
|
public DbSet<Pricing> Pricing { get; set; }
|
|
|
|
|
public DbSet<Order> Orders { get; set; }
|
|
|
|
|
public DbSet<OrderItem> OrderItems { get; set; }
|
|
|
|
|
public DbSet<Notification> Notifications { get; set; }
|
|
|
|
|
public DbSet<Question> Questions { get; set; }
|
|
|
|
|
public DbSet<QuestionCategory> QuestionCategories { get; set; }
|
|
|
|
|
public DbSet<Blog> Blogs { get; set; }
|
|
|
|
|
public DbSet<Ticket> Tickets { get; set; }
|
|
|
|
|
public DbSet<SubTicket> SubTickets { get; set; }
|
|
|
|
|
public DbSet<OrderDiscountCode> OrderDiscountCodes { get; set; }
|
|
|
|
|
public DbSet<TiceketUnknownPeople> TiceketUnknownPeoples { get; set; }
|
|
|
|
|
public DbSet<SaleLead> SaleLeads { get; set; }
|
2024-06-25 17:14:08 +03:30
|
|
|
|
public DbSet<UserNotfi> UserNotifis { get; set; }
|
2024-06-26 17:10:29 +03:30
|
|
|
|
public DbSet<stuff> Stuffs { get; set; }
|
2024-06-30 19:57:32 +03:30
|
|
|
|
public DbSet<Ulr> Ulrs { get; set; }
|
2024-07-04 18:49:11 +03:30
|
|
|
|
public DbSet<rptQueue> rptQueue { get; set; }
|
2024-03-30 15:10:36 +03:30
|
|
|
|
#endregion
|
|
|
|
|
//public override Task<int> SaveChangesAsync(CancellationToken cancellationToken = new CancellationToken())
|
|
|
|
|
//{
|
|
|
|
|
// foreach (var entry in ChangeTracker.Entries<EntityBase>())
|
|
|
|
|
// {
|
|
|
|
|
// switch (entry.State)
|
|
|
|
|
// {
|
|
|
|
|
// case EntityState.Added:
|
|
|
|
|
// entry.Entity.CreateDate = "";
|
|
|
|
|
// entry.Entity.CreatedBy = "mohammad";
|
|
|
|
|
// break;
|
|
|
|
|
// case EntityState.Modified:
|
|
|
|
|
// entry.Entity.ModifiedDate = "";
|
|
|
|
|
// entry.Entity.LastModifiedBy = "mohammad";
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// return base.SaveChangesAsync(cancellationToken);
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|