|
|
using System;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using SqlSugar;
|
|
|
|
|
|
namespace Entity.DbModel.Station
|
|
|
{
|
|
|
///<summary>
|
|
|
///电价模型详情
|
|
|
///</summary>
|
|
|
[SugarTable("elec_price_model_version_detail")]
|
|
|
public partial class ElecPriceModelVersionDetail
|
|
|
{
|
|
|
public ElecPriceModelVersionDetail(){
|
|
|
|
|
|
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// Desc:id
|
|
|
/// Default:
|
|
|
/// Nullable:False
|
|
|
/// </summary>
|
|
|
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
|
|
public int Id {get;set;}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:版本号
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName="version")]
|
|
|
public int Version {get;set;}
|
|
|
/// <summary>
|
|
|
/// 开始时间:小时
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName = "start_hour")]
|
|
|
public int StartHour { get; set; }
|
|
|
/// <summary>
|
|
|
/// 开始时间:分组
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName = "start_minute")]
|
|
|
public int StartMinute { get; set; }
|
|
|
/// <summary>
|
|
|
/// 开始时间:秒
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName = "start_second")]
|
|
|
public int StartSecond { get; set; }
|
|
|
/// <summary>
|
|
|
/// 结束时间:小时
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName = "end_hour")]
|
|
|
public int EndHour { get; set; }
|
|
|
/// <summary>
|
|
|
/// 结束时间:分钟
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName = "end_minute")]
|
|
|
public int EndMinute { get; set; }
|
|
|
/// <summary>
|
|
|
/// 结束时间:秒
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName = "end_second")]
|
|
|
public int EndSecond { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:价格;以分为单位存储
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName="price")]
|
|
|
public int? Price {get;set;}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:尖峰平谷类型;1-尖;2-峰;3-平;4-谷
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName="type")]
|
|
|
public int? Type {get;set;}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:创建人
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName="created_by")]
|
|
|
public string CreatedBy {get;set;}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:创建时间
|
|
|
/// Default:CURRENT_TIMESTAMP
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName="created_time")]
|
|
|
public DateTime? CreatedTime {get;set;}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:更新人
|
|
|
/// Default:
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName="updated_by")]
|
|
|
public string UpdatedBy {get;set;}
|
|
|
|
|
|
/// <summary>
|
|
|
/// Desc:更新时间
|
|
|
/// Default:CURRENT_TIMESTAMP
|
|
|
/// Nullable:True
|
|
|
/// </summary>
|
|
|
[SugarColumn(ColumnName="updated_time")]
|
|
|
public DateTime? UpdatedTime {get;set;}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 判断一个时间段是否包含另一个时间段(包括开始和结束时间的秒数)
|
|
|
/// </summary>
|
|
|
/// <param name="other"></param>
|
|
|
/// <returns></returns>
|
|
|
public bool Contains(ElecPriceModelVersionDetail other)
|
|
|
{
|
|
|
return (other.StartHour < EndHour ||
|
|
|
(other.StartHour == EndHour && other.StartMinute < EndMinute) ||
|
|
|
(other.StartHour == EndHour && other.StartMinute == EndMinute && other.StartSecond <= EndSecond)) &&
|
|
|
(other.EndHour > StartHour ||
|
|
|
(other.EndHour == StartHour && other.EndMinute > StartMinute) ||
|
|
|
(other.EndHour == StartHour && other.EndMinute == StartMinute && other.EndSecond >= StartSecond));
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|