using System.ComponentModel;
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Op.Entity
{
///
/// 业务相关费用状态表
///
[SqlSugar.SugarTable("op_business_fee_status", "业务相关费用状态表")]
public class BusinessFeeStatus : BaseModel
{
///
/// 业务Id
///
[SqlSugar.SugarColumn(ColumnDescription = "业务Id", IsNullable = false, Length = 100)]
public long BusinessId { get; set; }
///
/// 业务类型 1.海运出口
///
[SqlSugar.SugarColumn(ColumnDescription = "业务类型 1.海运出口", IsNullable = false, DefaultValue = "1")]
public BusinessType BusinessType { get; set; } = BusinessType.OceanShippingExport;
///
/// 应收费用状态
///
[SqlSugar.SugarColumn(ColumnDescription = "应收费用状态", IsNullable = false, DefaultValue = "0")]
public BillFeeStatus ARFeeStatus { get; set; } = BillFeeStatus.NotEntered;
///
/// 应付费用状态
///
[SqlSugar.SugarColumn(ColumnDescription = "应付费用状态", IsNullable = false, DefaultValue = "0")]
public BillFeeStatus APFeeStatus { get; set; } = BillFeeStatus.NotEntered;
///
/// 应收开票状态
///
[SqlSugar.SugarColumn(ColumnDescription = "应收开票状态", IsNullable = false, DefaultValue = "0")]
public int ARInvoiceStatus { get; set; } = 0;
///
/// 应付开票状态
///
[SqlSugar.SugarColumn(ColumnDescription = "应付开票状态", IsNullable = false, DefaultValue = "0")]
public int APInvoiceStatus { get; set; } = 0;
///
/// 应收对账状态
///
[SqlSugar.SugarColumn(ColumnDescription = "应收对账状态", IsNullable = false, DefaultValue = "0")]
public int ARCheckStatus { get; set; } = 0;
///
/// Desc:是否业务锁定
///
[SugarColumn(ColumnDescription = "是否业务锁定", DefaultValue = "0")]
public bool? IsBusinessLocking { get; set; } = false;
///
/// Desc:是否费用锁定
///
[SugarColumn(ColumnDescription = "是否费用锁定", DefaultValue = "0")]
public bool? IsFeeLocking { get; set; } = false;
///
/// 整单费用审核状态
///
[SqlSugar.SugarColumn(ColumnDescription = "整单费用审核状态", IsNullable = true, DefaultValue = "0")]
public BillAuditStatus BillAuditStatus { get; set; } = 0;
///
/// 整单费用状态时间
///
[SqlSugar.SugarColumn(ColumnDescription = "整单费用状态时间", IsNullable = true)]
public DateTime BillFeeStatusTime { get; set; }
[SugarColumn(ColumnDescription = "当前审批工作流ID", IsNullable = true)]
public long? FlowId { get; set; }
///
/// Desc:业务锁定人Id
///
[SugarColumn(ColumnDescription = "业务锁定人Id", IsNullable = true, DefaultValue = "0")]
public long BusinessLockingUserId { get; set; }
///
/// Desc:业务锁定人
///
[SugarColumn(ColumnDescription = "业务锁定人", IsNullable = true, Length =100)]
public string BusinessLockingUserName { get; set; }
///
/// 业务锁定时间
///
[SqlSugar.SugarColumn(ColumnDescription = "业务锁定时间", IsNullable = true)]
public DateTime BusinessLockingTime { get; set; }
///
/// Desc:业务解锁人Id
///
[SugarColumn(ColumnDescription = "业务解锁人Id", IsNullable = true, DefaultValue = "0")]
public long BusinessUnLockingUserId { get; set; }
///
/// Desc:业务解锁人
///
[SugarColumn(ColumnDescription = "业务解锁人", IsNullable = true, Length = 100)]
public string BusinessUnLockingUserName { get; set; }
///
/// 业务解锁时间
///
[SqlSugar.SugarColumn(ColumnDescription = "业务解锁时间", IsNullable = true)]
public DateTime BusinessUnLockingTime { get; set; }
///
/// Desc:费用锁定人Id
///
[SugarColumn(ColumnDescription = "费用锁定人Id", IsNullable = true, DefaultValue = "0")]
public long FeeLockingUserId { get; set; }
///
/// Desc:费用锁定人
///
[SugarColumn(ColumnDescription = "费用锁定人", IsNullable = true, Length = 100)]
public string FeeLockingUserName { get; set; }
///
/// 费用锁定时间
///
[SqlSugar.SugarColumn(ColumnDescription = "费用锁定时间", IsNullable = true)]
public DateTime FeeLockingTime { get; set; }
///
/// Desc:费用解锁人Id
///
[SugarColumn(ColumnDescription = "费用解锁人Id", IsNullable = true, DefaultValue = "0")]
public long FeeUnLockingUserId { get; set; }
///
/// Desc:费用解锁人
///
[SugarColumn(ColumnDescription = "费用解锁人", IsNullable = true, Length = 100)]
public string FeeUnLockingUserName { get; set; }
///
/// 费用解锁时间
///
[SqlSugar.SugarColumn(ColumnDescription = "费用解锁时间", IsNullable = true)]
public DateTime FeeUnLockingTime { get; set; }
///
/// 业务初始化费用状态
///
///
///
public static BusinessFeeStatus Init(long businessId)
{
return new BusinessFeeStatus()
{
BusinessId = businessId,
ARFeeStatus = 0,
APFeeStatus = 0,
ARInvoiceStatus = 0,
APInvoiceStatus = 0,
ARCheckStatus = 0,
IsBusinessLocking = false,
IsFeeLocking = false,
BillAuditStatus = BillAuditStatus.Pending,
//BillFeeStatusTime = null,
};
}
}
///
/// 业务类型
///
public enum BusinessType
{
///
/// 费用更改单
///
[Description("费用更改单")]
ChangeOrder = 0,
///
/// 海运出口
///
[Description("海运出口")]
OceanShippingExport = 1,
///
/// 海运进口
///
[Description("海运进口")]
OceanShippingImport = 2
}
}