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

namespace Model
{
    // 定义实体类
    public class User
    {
        public User() 
        {
            
        }
        public User(string user,string password) : this()
        { 
            this.Username = user;
            this.Password = password;
        }
        public User(string user, string password, PermissionLevel level):this(user,password) 
        {
            this.PermissionLevel = level;
        }
        public int Id { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public PermissionLevel PermissionLevel { get; set; }=PermissionLevel.操作工;
        public bool CanCloseSoftware { get; set; }
        
        // 如果将来加 Email，就在这里加 public string Email { get; set; }
    }
    public enum PermissionLevel
    {
        无权限 = -1,
        操作工 = 0,
        工程师 = 1,
        技术员 = 2,
        管理员 = 3,
        开发者 = 4,
    }
}
