using Hotline.Share.Dtos.File;
using SqlSugar;
using XF.Domain.Repository;

namespace Hotline.Orders;

/// <summary>
/// 工单补充
/// </summary>
public class OrderComplement : CreationEntity
{
    public string OrderId { get; set; }

    /// <summary>
    /// 工单
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(OrderId))]
    public Order Order { get; set; }

    /// <summary>
    /// 补充意见
    /// </summary>
    [SugarColumn(ColumnDataType = "text")]
    public string Opinion { get; set; }

    /// <summary>
    /// 补充人员
    /// </summary>
    public string? SupplyName { get; set; }

    /// <summary>
    /// 补充时间
    /// </summary>
    public DateTime? SupplyTime { get; set; }

    /// <summary>
    /// 省平台业务编号
    /// </summary>
    public string? DsBisId { get; set; }
    
    /// <summary>
    /// 工单编号
    /// </summary>
    public string? No { get; set; }

    /// <summary>
    /// 是否省补充
    /// </summary>
    [SugarColumn(DefaultValue = "f")]
    public bool IsProComplement { get; set; }

    /// <summary>
    /// 附件
    /// </summary>
    [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
    public List<FileJson> FileJson { get; set; }
}