using System;



namespace StuMgmLib.MyNameSpace
{

    public enum ErrCode
    {
        Success,
        FailSerial,
        FailDeserial,
        FailConnect,
        FailSend,
        FailReceive,
        ErrData,
    }

    public enum ClientFunc
    {
        VerifLogin = 1,
        GetCourseInfo,
        GetUserCourseInfo,
    }
    public enum LvErr
    {
        NotFound = -1,
        Error = -2,
        Admin = 1,
        Teacher = 2,
        Student = 3,
    }

    [Serializable]
    public class ClientRequest
    {
        public ClientFunc Func;
        public object Object;
        public ClientRequest(ClientFunc func, object obj)
        {
            Func = func;
            Object = obj;
        }
    }

    [Serializable]
    public class UserInfo
    {
        public short Account;
        public string Password;
        public Int16 Token;
        public LvErr UserLev;
        public UserInfo(short account, string password)
        {
            Account = account;
            Password = password;
        }
    }
    [Serializable]
    public class CourseInfo
    {
        public short Id;
        public short Pid;
        public int Time;
        public string Name;
        public string Content;
    }


    [Serializable]
    public enum CourseStatusEnum
    {
        NoStart = 0,
        Begin,
        WaitCheckig,
        CheckigSuccess,
        CheckigFail,
        //
    }

    [Serializable]
    public class UserCourseInfo
    {
        public short JobId;//工号
        public string Name;//姓名
        public string Status; // 课程状态
        public string Details;//信息描述
    }


    [Serializable]
    public class ServerResponse
    {
        public LvErr Lev;
        public int Token;
        public string CourseStatus;
        public object Object;
        public ServerResponse(object obj)
        {
            Object = obj;
        }
    }
    public class StreeDatas 
    {
        public int Id;
        public string Name;
        public int Pid;
        public string Content;
        public int Statu;
        public int FirstNode;
        public int SecondNode;
    }
}

