using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rdh.SocketServer.Client.Models
{
    /// <summary>
    /// 表示请求归还药箱的类
    /// </summary>
    public class RequestMedKitReturnProtocol : EleMedKitProtocol
    {
        public RequestMedKitReturnProtocol()
        {
            this.Command = EleMedKitCommand.RequestReturnMedKit;
            MinLines = base.MinLines + 1;
        }
        public UserInfoProtocol? UserInfo { get; set; }
        public override string GetContent()
        {
            return base.GetContent()
                + UserInfo?.ToString()
                + AddLineContent(CountFlag);
        }
        public override bool ParseContent(string[] lines)
        {
            if (!base.ParseContent(lines)
                || lines.Length < MinLines)
            {
                return false;
            }
            UserInfo = new UserInfoProtocol();
            return UserInfo.ParseContent(lines[2]);
        }
    }
}
