using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Domain.Repository;
using Hotline.Orders;
using Hotline.Share.Enums.Snapshot;

namespace Hotline.Snapshot;

/// <summary>
/// 市民红包审核
/// 先生成审核, 再生成红包发放记录
/// </summary>
[Description("市民红包审核")]
public class RedPackAudit : CreationSoftDeleteEntity
{
    /// <summary>
    /// 关联工单编号
    /// <inheritdoc cref="Order"/>表的Id字段
    /// </summary>    
    [SugarColumn(ColumnDescription = "关联工单编号")]
    public string OrderId { get; set; }

    /// <summary>
    /// 领取手机号码
    /// </summary>
    [SugarColumn(ColumnDescription = "领取红包手机号码")]
    public string? PhoneNumber { get; set; }

    /// <summary>
    /// 审核状态
    /// </summary>
    [SugarColumn(ColumnDescription = "审核状态")]
    public ERedPackAuditStatus Status { get; set; }

    /// <summary>
    /// 审批时间
    /// </summary>
    [SugarColumn(ColumnDescription = "审批时间")]
    public DateTime? AuditTime { get; set; }

    /// <summary>
    /// 配置金额
    /// </summary>
    [SugarColumn(ColumnDescription = "配置金额")]
    public double ShouldAmount { get; set; }

    /// <summary>
    /// 审批金额
    /// </summary>
    [SugarColumn(ColumnDescription = "审批金额")]
    public double? ApprovedAmount { get; set; }

    /// <summary>
    /// 实发金额
    /// </summary>
    [SugarColumn(ColumnDescription = "实发金额")]
    public double? AcutalAmount { get; set; }

    /// <summary>
    /// 市民奖励发放结果
    /// </summary>
    [SugarColumn(ColumnDescription = "市民奖励发放结果")]
    public bool IsSend { get; set; }

    /// <summary>
    /// 市民奖励发放备注
    /// </summary>
    [SugarColumn(ColumnDescription = "市民奖励发放备注")]
    public string? SendRemarks { get; set; }

    /// <summary>
    /// 操作人
    /// </summary>
    [SugarColumn(ColumnDescription = "操作人")]
    public string? AuditId { get; set; }

    /// <summary>
    /// 操作人
    /// </summary>
    [SugarColumn(ColumnDescription = "操作人")]
    public string? AuditName { get; set; }

    /// <summary>
    /// 审批部门
    /// </summary>
    [SugarColumn(ColumnDescription = "审批部门")]
    public string? AuditOrgId { get; set; }

    /// <summary>
    /// 审批部门名称
    /// </summary>
    [SugarColumn(ColumnDescription = "审批部门名称")]
    public string? AuditOrgName { get; set; }

    /// <summary>
    /// 审批意见
    /// </summary>
    [SugarColumn(ColumnDescription = "审批意见")]
    public string? AuditRemark { get; set; }

    public string? Remark { get; set; }

    /// <summary>
    /// 是否已发放
    /// </summary>
    //[SugarColumn(ColumnDescription = "是否已发放")]
    //public bool? IsIssued { get; set; }

    /// <summary>
    /// 短信Id
    /// </summary>
    [SugarColumn(ColumnDescription = "短信Id")]
    public string? SMSTemplateId { get; set; }

    /// <summary>
    /// 是否发送短信
    /// </summary>
    [SugarColumn(ColumnDescription = "是否发送短信")]
    public bool? IsSendSMS { get; set; }

    #region 积分
    /// <summary>
    /// 积分审核状态
    /// </summary>
    [SugarColumn(ColumnDescription = "积分审核状态")]
    public ESnapshotSMSStatus? PointsStatus { get; set; }

    /// <summary>
    /// 积分
    /// </summary>
    [SugarColumn(ColumnDescription = "积分")]
    public int? Points { get; set; }

    /// <summary>
    /// 额外扣除积分类型
    /// </summary>
    [SugarColumn(ColumnDescription = "额外扣除积分类型")]
    public string? ExtraDeductionPointsTypeId { get; set; }

    [SugarColumn(ColumnDescription = "额外扣除积分类型")]

    public string? ExtraDeductionPointsTypeName { get; set; }

    /// <summary>
    /// 额外扣除积分
    /// </summary>
    [SugarColumn(ColumnDescription = "额外扣除积分")]
    public int? ExtraDeductedPoints { get; set; }

    /// <summary>
    /// 积分审核意见
    /// </summary>
    [SugarColumn(ColumnDescription = "积分审核意见")]
    public string? PointsOpinion { get; set; }
    #endregion
}
