package com.example.myapplication.domain;

public class User {
    private String account;
    private String name;
    private String password;
    private int type;
    private String mobile;
    private int points;
    private Integer grade; // 年级（大几）
    private Long majorId;  // 专业ID

    public User() {}

    public User(String account, String name, String password, int type, String mobile) {
        this.account = account;
        this.name = name;
        this.password = password;
        this.type = type;
        this.mobile = mobile;
        this.points = 0;
        this.grade = null;
        this.majorId = null;
    }

    // 带积分的构造
    public User(String account, String name, String password, int type, String mobile, int points) {
        this.account = account;
        this.name = name;
        this.password = password;
        this.type = type;
        this.mobile = mobile;
        this.points = points;
        this.grade = null;
        this.majorId = null;
    }

    // 带年级与专业的构造
    public User(String account, String name, String password, int type, String mobile, int points, Integer grade, Long majorId) {
        this.account = account;
        this.name = name;
        this.password = password;
        this.type = type;
        this.mobile = mobile;
        this.points = points;
        this.grade = grade;
        this.majorId = majorId;
    }

    public String getAccount() { return account; }
    public void setAccount(String account) { this.account = account; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }
    public int getType() { return type; }
    public void setType(int type) { this.type = type; }
    public String getMobile() { return mobile; }
    public void setMobile(String mobile) { this.mobile = mobile; }
    public int getPoints() { return points; }
    public void setPoints(int points) { this.points = points; }
    public Integer getGrade() { return grade; }
    public void setGrade(Integer grade) { this.grade = grade; }
    public Long getMajorId() { return majorId; }
    public void setMajorId(Long majorId) { this.majorId = majorId; }
}