using Hotline.Share.Requests;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotline.Share.Dtos.Snapshot;
public class InviteCodeDto
{
}

public record GetInviteCodeItemsInDto : PagedRequest;

public class UpdateInviteCodeInDto : AddInviteCodeInDto
{
    /// <summary>
    /// Id
    /// </summary>
    public string Id { get; set; }
}
public class AddInviteCodeInDto
{
    /// <summary>
    /// 邀请码开始
    /// 邀请码开始 -> 结束 范围内的邀请码都有效
    /// </summary>
    [Required]
    public int BeginCode { get; set; }

    /// <summary>
    /// 邀请码结束
    /// 邀请码开始 -> 结束 范围内的邀请码都有效
    /// </summary>
    [Required]
    public int EndCode { get; set; }

    /// <summary>
    /// 部门名称
    /// </summary>
    [Required]
    public string OrgName { get; set; }

    /// <summary>
    /// 上级部门ID
    /// </summary>
    public string? ParentOrgId { get; set; }

    /// <summary>
    /// 邀请码Url
    /// </summary>
    public string? QRCodeUrl { get; set; }
}

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

    /// <summary>
    /// 部门名称
    /// </summary>
    public string OrgName { get; set; }

    /// <summary>
    /// 总量
    /// </summary>
    public int Count { get; set; }
}

public class GetInviteCodeStatisticInDto
{
    /// <summary>
    /// 统计开始时间
    /// </summary>
    [Required]
    public DateTime StartTime { get; set; }

    /// <summary>
    /// 统计结束书剑
    /// </summary>
    [Required]
    public DateTime EndTime { get; set; }
}

public record GetInviteCodeStatisticDetailInDto : PagedRequest
{
    /// <summary>
    /// Id
    /// </summary>
    [Required]
    public string OrgId { get; set; }

    /// <summary>
    /// 统计开始时间
    /// </summary>
    [Required]
    public DateTime StartTime { get; set; }

    /// <summary>
    /// 统计结束时间
    /// </summary>
    [Required]
    public DateTime EndTime { get; set; }

    /// <summary>
    /// 姓名
    /// </summary>
    public string? Name { get; set; }

    /// <summary>
    /// 电话
    /// </summary>
    public string? PhoneNumber { get; set; }

    /// <summary>
    /// 邀请码
    /// </summary>
    public string? InviteCode { get; set; }
}

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

    /// <summary>
    /// 姓名
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 电话
    /// </summary>
    public string PhoneNumber { get; set; }

    /// <summary>
    /// 微信OpenId
    /// </summary>
    public string OpenId { get; set; }

    /// <summary>
    /// 邀请时间
    /// </summary>
    public DateTime CreationTime { get; set; }

    /// <summary>
    /// 邀请码
    /// </summary>
    public string InviteCode { get; set; }

    /// <summary>
    /// 部门
    /// </summary>
    public string OrgName { get; set; }
}
