diff --git a/Entity/DbModel/Station/EmeterEnergy.cs b/Entity/DbModel/Station/EmeterEnergy.cs new file mode 100644 index 0000000..157944d --- /dev/null +++ b/Entity/DbModel/Station/EmeterEnergy.cs @@ -0,0 +1,33 @@ +using SqlSugar; + +namespace Entity.DbModel.Station; + +[SugarTable("emeter_energy")] +public class EmeterEnergy +{ + /// + /// 主键ID 与 EmeterEnergyChange ID相同 + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public virtual string Id { get; set; } + /// + /// 充电机电表编码 (充电机Sn) + /// + [SugarColumn(ColumnName = "code")] + public virtual string Code { get; set; } + /// + /// 电表当前读数 + /// + [SugarColumn(ColumnName = "value")] + public virtual string Value { get; set; } + /// + /// 充电机上报时间 + /// + [SugarColumn(ColumnName = "upload_time")] + public virtual string UploadTime { get; set; } + /// + /// 上报标识:0未上传 1上传 + /// + [SugarColumn(ColumnName = "upload_flag")] + public virtual string UploadFlag { get; set; } +} \ No newline at end of file diff --git a/Entity/DbModel/Station/EmeterEnergyChange.cs b/Entity/DbModel/Station/EmeterEnergyChange.cs new file mode 100644 index 0000000..28c6042 --- /dev/null +++ b/Entity/DbModel/Station/EmeterEnergyChange.cs @@ -0,0 +1,34 @@ +using SqlSugar; + +namespace Entity.DbModel.Station; + +[SugarTable("emeter_energy_change")] +public class EmeterEnergyChange +{ + /// + /// 主键ID 与EmeterEnergy id 相同 + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public virtual string Id { get; set; } + /// + /// 充电机电表编码 (充电机Sn) + /// + [SugarColumn(ColumnName = "code")] + public virtual string Code { get; set; } + /// + /// 电表当前读数 + /// + [SugarColumn(ColumnName = "value")] + public virtual string Value { get; set; } + /// + /// 充电机上报时间 + /// + [SugarColumn(ColumnName = "upload_time")] + public virtual string UploadTime { get; set; } + /// + /// 上报标识:0未上传 1上传 + /// + [SugarColumn(ColumnName = "upload_flag")] + public virtual string UploadFlag { get; set; } + +} \ No newline at end of file diff --git a/Repository/Station/EmeterEnergyChangeRepository.cs b/Repository/Station/EmeterEnergyChangeRepository.cs new file mode 100644 index 0000000..c95e2a3 --- /dev/null +++ b/Repository/Station/EmeterEnergyChangeRepository.cs @@ -0,0 +1,16 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using SqlSugar; +using Entity.DbModel.System; + +namespace Repository.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyChangeRepository : BaseRepository +{ + private ISqlSugarClient DbBaseClient; + public EmeterEnergyChangeRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) + { + DbBaseClient = sqlSugar; + } +} \ No newline at end of file diff --git a/Repository/Station/EmeterEnergyRepository.cs b/Repository/Station/EmeterEnergyRepository.cs new file mode 100644 index 0000000..24835a9 --- /dev/null +++ b/Repository/Station/EmeterEnergyRepository.cs @@ -0,0 +1,17 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using SqlSugar; +using Entity.DbModel.System; + + +namespace Repository.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyRepository : BaseRepository +{ + private ISqlSugarClient DbBaseClient; + public EmeterEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) + { + DbBaseClient = sqlSugar; + } +} \ No newline at end of file diff --git a/Service/Station/EmeterEnergyChangeService.cs b/Service/Station/EmeterEnergyChangeService.cs new file mode 100644 index 0000000..af49727 --- /dev/null +++ b/Service/Station/EmeterEnergyChangeService.cs @@ -0,0 +1,16 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using Repository.Station; + +namespace Service.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyChangeService : BaseServices +{ + private readonly EmeterEnergyChangeRepository _emeterEnergyChangeRep; + + public EmeterEnergyChangeService(EmeterEnergyChangeRepository emeterEnergyChangeRep) + { + _emeterEnergyChangeRep = emeterEnergyChangeRep; + } +} \ No newline at end of file diff --git a/Service/Station/EmeterEnergyService.cs b/Service/Station/EmeterEnergyService.cs new file mode 100644 index 0000000..53fd992 --- /dev/null +++ b/Service/Station/EmeterEnergyService.cs @@ -0,0 +1,16 @@ +using Entity.DbModel.Station; +using HybirdFrameworkCore.Autofac.Attribute; +using Repository.Station; + +namespace Service.Station; + +[Scope("SingleInstance")] +public class EmeterEnergyService : BaseServices +{ + private readonly EmeterEnergyRepository _emeterEnergyRep; + + public EmeterEnergyService(EmeterEnergyRepository emeterEnergyRep) + { + _emeterEnergyRep = emeterEnergyRep; + } +} \ No newline at end of file