123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- using Edge.Core.IndustryStandardInterface.ATG;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Text;
- namespace Application.ATG_Classic_App.Model
- {
- public abstract class BaseConfig
- {
- [Key]
- public int Id { get; set; }
-
-
- public DateTime CreatedTimeStamp { get; set; }
- public DateTime? ModifiedTimeStamp { get; set; }
- }
-
-
-
- public class TankOverallConfig : BaseConfig
- {
- public enum DeliveryOperationMode
- {
- Manual,
- Automatic
- }
-
-
-
-
-
-
- public double TcReference { get; set; }
-
-
-
-
- public int InventorySamplingInterval { get; set; } = 60000;
- public DeliveryOperationMode DeliveryMode { get; set; }
- }
- public class TankLimitConfig : BaseConfig
- {
-
-
-
-
- public double MaxVolume { get; set; }
-
-
-
- public double FullVolume { get; set; }
-
-
-
-
- public double HighProduct { get; set; }
-
-
-
-
- public double LowProduct { get; set; }
-
-
-
-
- public double HighWaterWarning { get; set; }
-
-
-
-
- public double HighWaterAlarm { get; set; }
-
-
-
- public double FuelTemperatureLowLimit { get; set; }
-
-
-
- public double FuelTemperatureHighLimit { get; set; }
- }
- public class ProductConfig : BaseConfig
- {
-
-
-
- [Required]
- public string ProductCode { get; set; }
-
-
-
- public string ProductLabel { get; set; }
- }
- public class ProbeConfig : BaseConfig
- {
-
-
-
- public int DeviceId { get; set; }
-
-
-
-
- public double ProbeOffset { get; set; }
-
-
-
- public double WaterOffset { get; set; }
- }
-
-
-
- public class TankProfileData
- {
- [Key]
- public int Id { get; set; }
-
-
-
- public string BatchLabel { get; set; }
- [ForeignKey("TankConfig")]
- public int TankConfigId { get; set; }
- public TankConfig TankConfig { get; set; }
- public double Height { get; set; }
- public double Volume { get; set; }
-
-
-
-
-
- public double? VolumeChange { get; set; }
- }
-
-
-
- public class TankConfig : BaseConfig
- {
-
-
-
- public byte TankNumber { get; set; }
-
-
-
- public string Label { get; set; }
-
-
-
- public double Diameter { get; set; }
-
-
-
- public double ThermalCoefficient { get; set; }
-
-
-
-
-
- public int DeliveryDelay { get; set; }
- public List<TankProfileData> TankProfileDatas { get; set; }
- [ForeignKey("ProductConfig")]
- public int? ProductConfigId { get; set; }
- public ProductConfig ProductConfig { get; set; }
- [ForeignKey("TankLimitConfig")]
- public int? TankLimitConfigId { get; set; }
- public TankLimitConfig TankLimitConfig { get; set; }
- [ForeignKey("ProbeConfig")]
- public int? ProbeConfigId { get; set; }
- public ProbeConfig ProbeConfig { get; set; }
- }
- }
|