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