人事管理系统 数据库 对象类

package com.company;

import java.util.Date;

/**
 * Created by ttc on 18-1-22.
 */
public class Sort {
    private int sid;
    private String sname = "a";
    private Date birthday = new Date();
    private String mail = "b";
    private String username = "c";
    private int password = 000;
    private int role = 0;

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getPassword() {
        return password;
    }

    public void setPassword(int password) {
        this.password = password;
    }

    @Override
    public String toString() {
        String role1 = "普通用户";
        if (role != 0){
            role1 = "管理员用户";
        }

        return "Sort{" +
                "sid=" + sid +
                ", sname='" + sname + '\'' +
                ", birthday=" + birthday +
                ", mail='" + mail + '\'' +
                ", username='" + username + '\'' +
                ", password=" + password +
                ", role=" + role1 +
                '}';
    }
}

你可能感兴趣的:(人事管理系统 数据库 对象类)