using System;
using System.Collections.Generic;
using System.Text;

namespace Model
{
    /// <summary>
    /// 用户对象
    /// </summary>
    [Serializable]
    public class User
    {
        #region 私有变量
        private string guid;
        private string loginName;
        private string pwd;
        private string display;
        private int group;
        private string sex;
        private string mark;
        private string contact;
        private string tel;
        private Reward reward;
        #endregion

        #region 构造函数
        /// <summary>
        /// 用户构造函数
        /// </summary>
        /// <param name="loginName">登录名</param>
        /// <param name="pwd">密码</param>
        /// <param name="sex">性别</param>
        /// <param name="display">显示的名字</param>
        /// <param name="group">所属的组</param>
        public User(string loginName, string pwd, string sex,string display, int group)
        {
            this.loginName = loginName;
            this.pwd = pwd;
            this.display = display;
            this.group = group;
            this.sex=sex;
        }
        /// <summary>
        /// 用户构造函数
        /// </summary>
        /// <param name="loginName">登录名</param>
        /// <param name="pwd">密码</param>
        /// <param name="sex">性别</param>
        /// <param name="display">显示的名字</param>
        /// <param name="mark">备注</param>
        /// <param name="contact">联系人</param>
        /// <param name="tel">电话</param>
        public User(string loginName, string pwd, string sex, string display,string mark,string contact,string tel)
        {
            this.loginName = loginName;
            this.pwd = pwd;
            this.display = display;
            this.mark = mark;
            this.sex = sex;
            this.contact = contact;
            this.tel = tel;
        }
        /// <summary>
        /// 用户构造函数
        /// </summary>
        /// <param name="loginName">登录名</param>
        /// <param name="pwd">密码</param>
        /// <param name="sex">性别</param>
        /// <param name="display">显示的名字</param>
        /// <param name="mark">备注</param>
        /// <param name="contact">联系人</param>
        /// <param name="tel">电话</param>
        /// <param name="group">所属的组</param>
        public User(string loginName, string pwd, string sex, string display, string mark, string contact, string tel,int group)
        {
            this.loginName = loginName;
            this.pwd = pwd;
            this.display = display;
            this.mark = mark;
            this.sex = sex;
            this.contact = contact;
            this.tel = tel;
            this.group = group;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="loginName"></param>
        /// <param name="pwd"></param>
        /// <param name="sex"></param>
        /// <param name="display"></param>
        /// <param name="mark"></param>
        /// <param name="contact"></param>
        /// <param name="tel"></param>
        /// <param name="group"></param>
        /// <param name="reward"></param>
        public User(string loginName, string pwd, string sex, string display, string mark, string contact, string tel, int group,int reward)
        {
            this.loginName = loginName;
            this.pwd = pwd;
            this.display = display;
            this.mark = mark;
            this.sex = sex;
            this.contact = contact;
            this.tel = tel;
            this.group = group;
            this.reward = new Reward(reward);

        }
        /// <summary>
        /// 虚构函数
        /// </summary>
        public User()
        {

        }
        /// <summary>
        /// 用户构造函数
        /// </summary>
        /// <param name="guid">用户编号</param>
        /// <param name="loginName">登录名</param>
        /// <param name="pwd">密码</param>
        /// <param name="sex">性别</param>
        /// <param name="display">显示的名字</param>
        /// <param name="group">所属的组</param>
        public User(string guid, string loginName, string pwd, string sex, string display, int group)
        {
            this.guid = guid;
            this.loginName = loginName;
            this.pwd = pwd;
            this.display = display;
            this.group = group;
            this.sex = sex;
        }
        #endregion

        #region 属性
        /// <summary>
        /// 联系人
        /// </summary>
        public string Contact
        {
            get { return this.contact; }
            set { this.contact = value; }
        }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string Tel
        {
            get { return this.tel; }
            set { this.tel = value; }
        }
        /// <summary>
        /// 备注
        /// </summary>
        public string Mark
        {
            get { return this.mark; }
            set { this.mark= value; }
        }
        /// <summary>
        /// 用户编号
        /// </summary>
        public string Guid
        {
            get { return this.guid; }
            set { this.guid = value; }
        }
        /// <summary>
        /// 性别
        /// </summary>
        public string Sex
        {
            get { return this.sex; }
            set{this.sex=value;}
        }
        /// <summary>
        /// 登录名
        /// </summary>
        public string LoginName
        {
            get { return this.loginName; }
            set { this.loginName = value; }
        }
        /// <summary>
        /// 密码
        /// </summary>
        public string Pwd
        {
            get { return this.pwd; }
            set { this.pwd = value; }
        }
        /// <summary>
        /// 显示的名字
        /// </summary>
        public string DisPlay
        {
            get { return this.display; }
            set { this.display = value; }
        }
        /// <summary>
        /// 用户所属的组
        /// </summary>
        public int Group
        {
            get { return this.group; }
            set { this.group = value; }
        }
        public int Reward
        {
            get
            {
                return this.reward.GetReward;
            }
        }
        #endregion

    }
}
