package safeluck.drive.evaluation.DB; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; /** * MyApplication2 * Created by lzw on 2019/11/25. 10:43:57 * 邮箱:632393724@qq.com * All Rights Saved! Chongqing AnYun Tech co. LTD */ @Entity(tableName = "student_table") public class Student { @PrimaryKey @NonNull @ColumnInfo(name = "stu_id") private long stu_id; @NonNull @ColumnInfo(name = "name") private String name; //身份证 @ColumnInfo(name = "ID") private String ID; //性别 0-男 1-女 @ColumnInfo(name = "sex") private int sex; //性别 0-男 1-女 @ColumnInfo(name = "head_url") private String head_url; @ColumnInfo(name ="person_type") private int personType = 1; public String getHead_url() { return head_url; } public void setHead_url(String head_url) { this.head_url = head_url; } public long getBegin_time() { return begin_time; } public void setBegin_time(long begin_time) { this.begin_time = begin_time; } @ColumnInfo(name = "begin_time") private long begin_time; // public Student(long stu_id, @NonNull String name, String ID, int sex) { // this.stu_id = stu_id; // this.name = name; // this.ID = ID; // this.sex = sex; // } public long getStu_id() { return stu_id; } public void setStu_id(long stu_ID) { this.stu_id = stu_ID; } public String getID() { return ID; } public void setID(String mID) { this.ID = mID; } public int getSex() { return sex; } public void setSex(int sex) { this.sex = sex; } @NonNull public String getName() { return name; } public void setName(@NonNull String name) { this.name = name; } @Override public String toString() { return "Student{" + "stu_id=" + stu_id + ", name='" + name + '\'' + ", ID='" + ID + '\'' + ", sex=" + sex + ", head_url='" + head_url + '\'' + ", begin_time=" + begin_time + '}'; } public void setPersonType(int personType) { this.personType = personType; } public int getPersonType() { return personType; } }