using Consul;
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 QueryTelResponse
{
    public string Id { get; set; }
    public string Name { get; set; }
    public string TelNo { get; set; }
    public string Description { get; set; }
    public string Password { get; set; }
    public string QueueId { get; set; }
}

public class QueryTelStateResponse
{
    public string Count { get; set; }

    public List<Agent>? AgentList { get; set; }

    public List<Agent>? Agents { get; set; }
}

public class Agent
{
    /// <summary>
    /// ID
    /// </summary>
    [JsonPropertyName("id")]
    public string? Id { get; set; }

    /// <summary>
    /// 分机号
    /// </summary>
    [JsonPropertyName("extn")]
    public string? TelNo { get; set; }
    /// <summary>
    /// 通道流水
    /// </summary>
    [JsonPropertyName("channel_uuid")]
    public string? ChannelUUid { get; set; }
    /// <summary>
    /// 鉴权用户名
    /// </summary>
    [JsonPropertyName("name")]
    public string? TelName { get; set; }
    /// <summary>
    /// 分机状态机类型
    /// </summary>
    [JsonPropertyName("type")]
    public string? Type { get; set; }
    /// <summary>
    /// 权重
    /// </summary>
    [JsonPropertyName("weight")]
    public string? Weight { get; set; }

    /// <summary>
    /// 所在呼叫组
    /// </summary>
    [JsonPropertyName("queue")]
    public string? Queue { get; set; }

    /// <summary>
    /// 分机状态
    /// </summary>
    [JsonPropertyName("state")]
    public string? State { get; set; }

    /// <summary>
    /// 前一状态
    /// </summary>
    [JsonPropertyName("old_state")]
    public string? OldState { get; set; }

    /// <summary>
    /// 注册设备
    /// </summary>
    [JsonPropertyName("device")]
    public string? Device { get; set; }

    /// <summary>
    /// 注册IP
    /// </summary>
    [JsonPropertyName("sip_ip")]
    public string? SipIp { get; set; }

    /// <summary>
    /// 二级状态
    /// </summary>
    [JsonPropertyName("private_data")]
    public string? PrivateData { get; set; }

    /// <summary>
    /// 是否注册
    /// </summary>
    [JsonPropertyName("sip_state")]
    public string? SipState { get; set; }

    /// <summary>
    /// 签入时间
    /// </summary>
    [JsonPropertyName("created_at")]
    public string? CreatedAt { get; set; }

    /// <summary>
    /// 状态变更时间
    /// </summary>
    [JsonPropertyName("updated_at")]
    public string? UpdatedAt { get; set; }

    /// <summary>
    /// 呼叫方向
    /// </summary>
    [JsonPropertyName("call_direction")]
    public string? CallDirection { get; set; }

    /// <summary>
    /// 呼叫号码
    /// </summary>
    [JsonPropertyName("other_number")]
    public string? OtherNumber { get; set; }

    /// <summary>
    /// 使用线路
    /// </summary>
    [JsonPropertyName("gateway")]
    public string? GateWay { get; set; }

    /// <summary>
    /// 接听时间
    /// </summary>
    [JsonPropertyName("answered_at")]
    public string? AnsweredAt { get; set; }
}

