ProductionLineContext.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Microsoft.EntityFrameworkCore;
  2. using ProductionLineMonitor.Core.Models;
  3. namespace ProductionLineMonitor.EntityFramework
  4. {
  5. public class ProductionLineContext : DbContext
  6. {
  7. public ProductionLineContext(DbContextOptions<ProductionLineContext> options)
  8. : base(options)
  9. {
  10. }
  11. protected override void OnModelCreating(ModelBuilder modelBuilder)
  12. {
  13. base.OnModelCreating(modelBuilder);
  14. }
  15. public DbSet<User>? Users { get; set; }
  16. public DbSet<Role>? Roles { get; set; }
  17. public DbSet<ProductionLine>? ProductionLines { get; set; }
  18. public DbSet<Machine>? Machines { get; set; }
  19. public DbSet<Cim>? Cims { get; set; }
  20. public DbSet<MachineOutPutPerHour>? MachineOutPutPerHours { get; set; }
  21. public DbSet<Recipe>? Recipes { get; set; }
  22. public DbSet<MachineFaultComparison>? MachineFaultComparisons { get; set; }
  23. public DbSet<MachineFaultRecord>? MachineFaultRecords { get; set; }
  24. public DbSet<MachinePowerConsumption>? MachinePowerConsumptions { get; set; }
  25. public DbSet<MachineStatistic>? MachineStatistics { get; set; }
  26. #region 工艺数据
  27. public DbSet<MachineProcessFOG>? MachineProcessFOGs { get; set; }
  28. public DbSet<MachineProcessPS>? MachineProcessPSs { get; set; }
  29. public DbSet<MachineProcessBT>? MachineProcessBTs { get; set; }
  30. public DbSet<MachineProcessPSEPD>? MachineProcessPSEPDs { get; set; }
  31. #endregion
  32. public DbSet<Menu>? Menus { get; set; }
  33. public DbSet<RoleMenu>? RoleMenus { get; set; }
  34. public DbSet<ElectricEnergyMeter>? ElectricEnergyMeters { get; set; }
  35. public DbSet<ElectricEnergyMeterLog>? ElectricEnergyMeterLogs { get; set; }
  36. }
  37. }