using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Op.Entity;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.Core.Fee.Entity
{
///
/// 往来单位费用模板
///
[SugarTable("fee_cust_template", "往来单位费用模板")]
public class FeeCustTemplate : SharedOrgModel
{
///
/// 业务类型
///
[SugarColumn(ColumnDescription = "业务类型")]
public BusinessType BusinessType { get; set; }
///
/// 业务类型文本
///
[SugarColumn(IsIgnore = true)]
public string BusinessTypeText => BusinessType.GetDescription();
///
/// 结算对象Id
///
[SugarColumn(ColumnDescription = "结算对象Id")]
public long? CustomerId { get; set; }
///
/// 结算对象
///
[SugarColumn(ColumnDescription = "结算对象", Length = 100, IsNullable = true)]
public string? CustomerName { get; set; }
///
/// 名称
///
[SugarColumn(ColumnDescription = "名称", Length = 50, IsNullable = false)]
public string Name { get; set; } = string.Empty;
///
/// 说明
///
[SugarColumn(ColumnDescription = "说明", Length = 200, IsNullable = true)]
public string? Description { get; set; }
///
/// 判定条件
///
[SugarColumn(ColumnDescription = "判定条件", IsNullable = true)]
public string? Condition { get; set; }
///
/// 费用类型
///
[SugarColumn(ColumnDescription = "费用类型", IsNullable = false)]
public FeeType FeeType { get; set; }
///
/// 费用类型文本
///
[SugarColumn(IsIgnore = true)]
public string FeeTypeText => FeeType.GetDescription();
///
/// 开始时间
///
[SugarColumn(ColumnDescription = "开始时间", IsNullable = true)]
public DateTime? StartTime { get; set; }
///
/// 结束时间
///
[SugarColumn(ColumnDescription = "结束时间", IsNullable = true)]
public DateTime? EndTime { get; set; }
///
/// 是否禁用
///
[SugarColumn(ColumnDescription = "是否禁用", IsNullable = false)]
public bool IsDisabled { get; set; }
///
/// 费用类别ID
///
[SugarColumn(ColumnDescription = "费用类别ID", Length = 50, IsNullable = true)]
public string? FeeCategoryId { get; set; }
///
/// 费用类别名称
///
[SugarColumn(ColumnDescription = "费用类别名称", Length = 50, IsNullable = true)]
public string? FeeCategoryName { get; set; }
///
/// 优先级
///
[SugarColumn(ColumnDescription = "优先级", IsNullable = false)]
public int Priority { get; set; }
///
/// 起运港代码
///
[SugarColumn(ColumnDescription = "起运港代码", Length = 5, IsNullable = true)]
public string? POLCode { get; set; }
///
/// 卸货港代码
///
[SugarColumn(ColumnDescription = "卸货港代码", Length = 5, IsNullable = true)]
public string? PODCode { get; set; }
///
/// 航线代码
///
[SugarColumn(ColumnDescription = "航线代码", Length = 50, IsNullable = true)]
public long? LaneId { get; set; }
///
/// 承运商代码
///
[SugarColumn(ColumnDescription = "承运商代码", Length = 50, IsNullable = true)]
public long? CarrierId { get; set; }
///
/// 付费方式代码
///
[SugarColumn(ColumnDescription = "付费方式代码", Length = 50, IsNullable = true)]
public string? MBLFrtCode { get; set; }
///
/// 业务来源ID
///
[SugarColumn(ColumnDescription = "业务来源ID", IsNullable = true)]
public long? SourceId { get; set; }
///
/// 业务来源明细ID
///
[SugarColumn(ColumnDescription = "业务来源明细ID", IsNullable = true)]
public long? SourceDetailId { get; set; }
///
/// 订舱口ID
///
[SugarColumn(ColumnDescription = "订舱口ID", IsNullable = true)]
public long? ForwarderId { get; set; }
///
/// 分公司ID
///
[SugarColumn(ColumnDescription = "分公司ID", IsNullable = true)]
public long? DeptOrgId { get; set; }
///
/// 模板明细
///
[Navigate(NavigateType.OneToMany, nameof(FeeCustTemplateDetail.TemplateId))]
public List Details { get; set; } = [];
}
}