using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Hotline.CallCenter.Tels.CallTelDomain;
public class QueryTelRequest
{
    /// <summary>
    /// 分机号
    /// </summary>
    [RequestProperty(Name = "extn")]
    public string? TelNo { get; set; }

}

public class QueryBlacklistRequest
{
    public string Path() => "api/special_phone/special_phone_detail";

    public Method HttpMethod() => Method.Get;

    [RequestProperty(Name = "phone")]
    public string? Phone { get; set; }

    /// <summary>
    /// 1:白名单;2:呼入黑名单;3:呼出黑名单;4:呼入呼出黑名单;
    /// </summary>
    [RequestProperty(Name = "special_flag")]
    public int? SpecialFlag { get; set; }
}
public class QueryBlacklistResponse
{
    public string Id { get; set; }

    public string UserId { get; set; }

    public string CreationTime { get; set; }
    public string Phone { get; set; }

    public int SpecialFlag { get; set; }
    public int? Priority { get; set; }
}

public class DelBlacklistRequest
{
    public string Path() => "api/special_phone/delete";

    public Method HttpMethod() => Method.Post;


    [RequestProperty(Name = "phone")]
    public string Phone { get; set; }

    /// <summary>
    /// 1:白名单;2:呼入黑名单;3:呼出黑名单;4:呼入呼出黑名单;
    /// </summary>
    [RequestProperty(Name = "special_flag")]
    public int? SpecialFlag { get; set; }
}

public class AddBlacklistRequest
{
    [RequestProperty(Name = "phone")]
    public string Phone { get; set; }

    /// <summary>
    /// 1:白名单;2:呼入黑名单;3:呼出黑名单;4:呼入呼出黑名单;
    /// </summary>
    [RequestProperty(Name = "special_flag")]
    public int SpecialFlag { get; set; }

    public string Path() => "api/special_phone/insert";

    public Method HttpMethod() => Method.Post;
}

public class QueryTelStateRequest
{
    public Method HttpMethod() => Method.Get;

    public string Path() => $"api/ola/agents/{TelNo}";

    /// <summary>
    /// 分机号
    /// </summary>
    [RequestProperty(Name = "extn")]
    public string? TelNo { get; set; }

    /// <summary>
    /// 需查询状态
    /// </summary>
    [RequestProperty(Name = "state")]
    public string? State { get; set; }
}
