using System.ComponentModel;
using Hotline.Share.Enums.Order;
using Hotline.Share.Enums.Settings;
using SqlSugar;
using XF.Domain.Repository;

namespace Hotline.Settings;

[Description("工时常量配置")]
public class TimeLimitSetting : CreationEntity
{
    /// <summary>
    /// 业务Code
    /// </summary>
    public string BusCode { get; set; }

    /// <summary>
    /// 时间类型
    /// </summary>
    public ETimeType TimeType { get; set; }

    /// <summary>
    /// 时间值
    /// </summary>
    public int TimeValue { get; set; }

    /// <summary>
    /// 业务名称
    /// </summary>
    public string BusName { get; set; }

    /// <summary>
    /// 超期时限百分比
    /// </summary>
    public int Percentage { get; set; }

    /// <summary>
    /// 超期时间百分比（第一级）
    /// </summary>
    public int PercentageOne { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 期满时间收尾方式
    /// </summary>
    [SugarColumn(DefaultValue = "0")]
    public int? EndType { get; set; }
}


[Description("工时常量 属性表")]
public class TimeLimitSettingAttribute : CreationEntity
{
    /// <summary>
    /// 业务Code
    /// </summary>
    public string BusCode { get; set; }

    /// <summary>
    /// 自增长编码
    /// </summary>
    [SugarColumn(IsIdentity = true)]
    public int Code { get; set; }

    /// <summary>
    /// 属性名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 属性值
    /// </summary>
    public string Value { get; set; }

    /// <summary>
    /// 是否可以组合
    /// </summary>
    public bool IsCommon { get; set; }

}

[Description("工作常量 库存")]
public class TimeLimitSettingInventory : CreationEntity
{ 
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 属性表 Code 的 和
    /// </summary>
    public string Code { get; set; } 

    /// <summary>
    /// 时间值
    /// </summary>
    public int TimeValue { get; set; }

    /// <summary>
    /// 时间类型
    /// </summary>
    public ETimeType TimeType { get; set; }

    /// <summary>
    /// 超期时限百分比
    /// </summary>
    public int Percentage { get; set; }

    /// <summary>
    /// 超期时间百分比（第一级）
    /// </summary>
    public int PercentageOne { get; set; }    
}
