using Core.Protocol;
using System.Runtime.Serialization;

namespace Core.WcfProtocol
{
    [DataContract]
    public class RegisterModelRequest
    {
        /// <summary>
        /// 进程Id
        /// </summary>
        [DataMember]
        public Int32 ProcId { get; set; }

        /// <summary>
        /// 进程类型
        /// </summary>
        [DataMember]
        public Int32 ProcType { get; set; }

        /// <summary>
        /// 进程通信号
        /// </summary>
        [DataMember]
        public Int32 ProcChannel { get; set; }

        /// <summary>
        /// 进程启动时间
        /// </summary>
        [DataMember]
        public Int64 ProcStartTime { get; set; }

        /// <summary>
        /// 接收消息端口
        /// </summary>
        [DataMember]
        public Int32 AcceptPort { get; set; }
    }

    /// <summary>
    /// 注册结果
    /// </summary>
    [DataContract]
    public class RegisterModelReply : Base2Reply
    {
    }

    [DataContract]
    public class UploadImageRequest
    {
        /// <summary>
        /// 唯一标识
        /// </summary>
        [DataMember]
        public Int64 Id { get; set; }

        /// <summary>
        /// 设备 IP
        /// </summary>
        [DataMember]
        public string IpAddress { get; set; }
            = string.Empty;

        /// <summary>
        /// 进程 ID
        /// </summary>
        [DataMember]
        public Int32 ProcId { get; set; }

        /// <summary>
        /// 图片序号
        /// </summary>
        [DataMember]
        public UInt64 Order { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [DataMember]
        public string Name { get; set; }
            = string.Empty;

        /// <summary>
        /// 类型
        /// </summary>
        [DataMember]
        public string Type { get; set; }
            = string.Empty;

        /// <summary>
        /// 时间
        /// </summary>
        [DataMember]
        public DateTime Time { get; set; }

        /// <summary>
        /// 图片数据
        /// </summary>
        [DataMember]
        public byte[]? ImageBytes { get; set; }

        /// <summary>
        /// 图像宽度
        /// </summary>
        [DataMember]
        public int ImageWidth { get; set; }

        /// <summary>
        /// 图像高度
        /// </summary>
        [DataMember]
        public int ImageHeight { get; set; }

        /// <summary>
        /// 图片数据
        /// </summary>
        [DataMember]
        public string ImageData { get; set; }
            = string.Empty;
    }

    /// <summary>
    /// 图片上传回复
    /// </summary>
    [DataContract]
    public class UploadImageReply : Base2Reply
    {
    }
}