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

namespace Tr.Sdk.Blacklist
{
    public class QueryBlacklistRequest: TrRequest
    {
        public override string Path() => "api/special_phone/special_phone_detail";

        public override 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
    {
        [JsonPropertyName("uuid")]
        public string Id { get; set; }

        [JsonPropertyName("user_uuid")]
        public string UserId { get; set; }

        [JsonPropertyName("created_at")]
        public string CreationTime { get; set; }

        public string Phone { get; set; }

        [JsonPropertyName("special_flag")]
        public int SpecialFlag { get; set; }

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