using Hotline.Share.Enums.Snapshot;
using Hotline.Share.Requests;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.Snapshot;
internal class RedPackRecordDto
{
}

public class SnapshotRedPackRecordSendOutDto
{
    /// <summary>
    /// Id
    /// </summary>
    public string Id { get; set; }

    /// <summary>
    /// 工单Id
    /// </summary>
    public string OrderId { get; set; }

    /// <summary>
    /// No
    /// </summary>
    public string No { get; set; }

    /// <summary>
    /// 用户类型
    /// </summary>
    public EReadPackUserType UserType { get; set; }

    /// <summary>
    /// 用户类型
    /// </summary>
    public string UserTypeTxt => UserType.GetDescription();

    /// <summary>
    /// 行业
    /// </summary>
    public string IndustryName { get; set; }

    /// <summary>
    /// OpenId
    /// </summary>
    [JsonPropertyName("wXOpenId")]
    public string WXOpenId { get; set; }

    /// <summary>
    /// 商户订单号
    /// </summary>
    public string MerchantCode { get; set; }

    /// <summary>
    /// 金额
    /// </summary>
    public double Amount { get; set; }

    /// <summary>
    /// 发放时间
    /// </summary>
    public DateTime CreationTime { get; set; }

    /// <summary>
    /// 发放状态
    /// </summary>
    public EReadPackSendStatus DistributionState { get; set; }

    /// <summary>
    /// 发放状态
    /// </summary>
    public string DistributionStateTxt => DistributionState.GetDescription();

    /// <summary>
    /// 领取状态
    /// </summary>
    public ERedPackPickupStatus PickupStatus { get; set; }

    /// <summary>
    /// 领取状态
    /// </summary>
    public string PickupStatusTxt => PickupStatus.GetDescription();

    /// <summary>
    /// 领取操作时间
    /// </summary>
    public DateTime? ReceiveTime { get; set; }

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

public record SnapshotRedPackRecordSendInDto : PagedRequest
{
    /// <summary>
    /// 状态;
    /// 0: 全部;
    /// 1: 已领取;
    /// 2: 已退款;
    /// 3: 发放失败;
    /// 4: 待领取;
    /// </summary>
    public int Status { get; set; }

    /// <summary>
    /// 行业
    /// </summary>
    public string? IndustryId { get; set; }

    /// <summary>
    /// 编号
    /// </summary>
    public string? No { get; set; }

    /// <summary>
    /// 发放用户类型
    /// </summary>
    public EReadPackUserType? UserType { get; set; }

    /// <summary>
    /// 用户OpenId
    /// </summary>
    public string? OpenId { get; set; }

    /// <summary>
    /// 发送状态
    /// </summary>
    public EReadPackSendStatus? SendStatus { get; set; }

    /// <summary>
    /// 是否领取
    /// </summary>
    public bool? IsReceive { get; set; }

    /// <summary>
    /// 是否补领
    /// </summary>
    public bool? IsReplace { get; set; }

    /// <summary>
    /// 发放时间开始
    /// </summary>
    public DateTime? BeginCreationTime { get; set; }

    /// <summary>
    /// 发放时间结束
    /// </summary>
    public DateTime? EndCreationTime { get; set; }
}

public record SnapshotRedPackRecordItemsGuiderInDto : SnapshotRedPackRecordItemsInDto
{
    /// <summary>
    /// 姓名
    /// </summary>
    public string? Name { get; set; }
}
public record SnapshotRedPackRecordItemsInDto : PagedRequest
{
    /// <summary>
    /// 发送状态;
    /// 0: 发送成功;
    /// 1: 发送失败;
    /// 2: 未发送;
    /// 3: 婉拒
    /// </summary>
    public int Status { get; set; }

    /// <summary>
    /// 手机号码
    /// </summary>
    public string? PhoneNumber { get; set; }

    /// <summary>
    /// No
    /// </summary>
    public string? No { get; set; }

    /// <summary>
    /// 增加开始时间
    /// </summary>
    public DateTime? BeginCreationTime { get; set; }

    /// <summary>
    /// 增加结束时间
    /// </summary>
    public DateTime? EndCreationTime { get; set; }
}

public class SnapshotRedPackRecordItemsGuiderOutDto : SnapshotRedPackRecordItemsOutDto
{
    /// <summary>
    /// 姓名
    /// </summary>
    public string Name { get; set; }
}

public class SnapshotRedPackRecordItemsOutDto
{
    /// <summary>
    /// Id
    /// </summary>
    public string Id { get; set; }

    /// <summary>
    /// 工单Id
    /// </summary>
    public string OrderId { get; set; }

    /// <summary>
    /// No
    /// </summary>
    public string No { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime? CreationTime { get; set; }

    /// <summary>
    /// PhoneNumber
    /// 手机号
    /// </summary>
    public string PhoneNumber { get; set; }

    /// <summary>
    /// 金额
    /// </summary>
    public double Amount { get; set; }

    /// <summary>
    /// 发放时间
    /// </summary>
    public DateTime? ReceiveTime { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public EReadPackSendStatus DistributionState { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public string DistributionStateTxt => DistributionState.GetDescription();

    /// <summary>
    /// 红包领取状态
    /// </summary>
    public ERedPackPickupStatus PickupStatus { get; set; }

    /// <summary>
    /// 红包领取状态
    /// </summary>
    public string PickupStatusTxt => PickupStatus.GetDescription();

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