电能对象

zw
lch 6 months ago
parent 79c6449a0a
commit e62cd8272c

@ -0,0 +1,33 @@
using SqlSugar;
namespace Entity.DbModel.Station;
[SugarTable("emeter_energy")]
public class EmeterEnergy
{
/// <summary>
/// 主键ID 与 EmeterEnergyChange ID相同
/// </summary>
[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
public virtual string Id { get; set; }
/// <summary>
/// 充电机电表编码 (充电机Sn)
/// </summary>
[SugarColumn(ColumnName = "code")]
public virtual string Code { get; set; }
/// <summary>
/// 电表当前读数
/// </summary>
[SugarColumn(ColumnName = "value")]
public virtual string Value { get; set; }
/// <summary>
/// 充电机上报时间
/// </summary>
[SugarColumn(ColumnName = "upload_time")]
public virtual string UploadTime { get; set; }
/// <summary>
/// 上报标识0未上传 1上传
/// </summary>
[SugarColumn(ColumnName = "upload_flag")]
public virtual string UploadFlag { get; set; }
}

@ -0,0 +1,34 @@
using SqlSugar;
namespace Entity.DbModel.Station;
[SugarTable("emeter_energy_change")]
public class EmeterEnergyChange
{
/// <summary>
/// 主键ID 与EmeterEnergy id 相同
/// </summary>
[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
public virtual string Id { get; set; }
/// <summary>
/// 充电机电表编码 (充电机Sn)
/// </summary>
[SugarColumn(ColumnName = "code")]
public virtual string Code { get; set; }
/// <summary>
/// 电表当前读数
/// </summary>
[SugarColumn(ColumnName = "value")]
public virtual string Value { get; set; }
/// <summary>
/// 充电机上报时间
/// </summary>
[SugarColumn(ColumnName = "upload_time")]
public virtual string UploadTime { get; set; }
/// <summary>
/// 上报标识0未上传 1上传
/// </summary>
[SugarColumn(ColumnName = "upload_flag")]
public virtual string UploadFlag { get; set; }
}

@ -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<EmeterEnergyChange>
{
private ISqlSugarClient DbBaseClient;
public EmeterEnergyChangeRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
DbBaseClient = sqlSugar;
}
}

@ -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<EmeterEnergy>
{
private ISqlSugarClient DbBaseClient;
public EmeterEnergyRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
DbBaseClient = sqlSugar;
}
}

@ -0,0 +1,16 @@
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.Station;
namespace Service.Station;
[Scope("SingleInstance")]
public class EmeterEnergyChangeService : BaseServices<EmeterEnergyChange>
{
private readonly EmeterEnergyChangeRepository _emeterEnergyChangeRep;
public EmeterEnergyChangeService(EmeterEnergyChangeRepository emeterEnergyChangeRep)
{
_emeterEnergyChangeRep = emeterEnergyChangeRep;
}
}

@ -0,0 +1,16 @@
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.Station;
namespace Service.Station;
[Scope("SingleInstance")]
public class EmeterEnergyService : BaseServices<EmeterEnergy>
{
private readonly EmeterEnergyRepository _emeterEnergyRep;
public EmeterEnergyService(EmeterEnergyRepository emeterEnergyRep)
{
_emeterEnergyRep = emeterEnergyRep;
}
}
Loading…
Cancel
Save