package safeluck.drive.evaluation.DB.failitems;
|
|
import androidx.room.ColumnInfo;
|
import androidx.room.Entity;
|
import androidx.room.ForeignKey;
|
import androidx.room.Index;
|
import androidx.room.PrimaryKey;
|
|
import safeluck.drive.evaluation.DB.criterias.CriteriaForI;
|
|
import static androidx.room.ForeignKey.CASCADE;
|
|
/**
|
* MyApplication2
|
* 失败项目条目
|
* Created by lzw on 2019/11/26. 17:59:20
|
* 邮箱:632393724@qq.com
|
* All Rights Saved! Chongqing AnYun Tech co. LTD
|
*/
|
@Entity(tableName = "fail_projects",foreignKeys = @ForeignKey(entity = CriteriaForI.class,
|
parentColumns = "item_id",childColumns = "emp_id",onDelete = CASCADE),indices = @Index(value = {"emp_id"}))
|
public class FailedProj {
|
@PrimaryKey(autoGenerate = true)
|
private int id;
|
|
|
|
@ColumnInfo(name = "subject")
|
private int subject;
|
|
//作为外键,对应I类考场的item_id
|
@ColumnInfo(name = "emp_id")
|
private int emp_id;
|
|
public FailedProj(int subject, int emp_id) {
|
this.subject = subject;
|
this.emp_id = emp_id;
|
}
|
|
public int getId() {
|
return id;
|
}
|
|
public void setId(int id) {
|
this.id = id;
|
}
|
|
public int getSubject() {
|
return subject;
|
}
|
|
public void setSubject(int subject) {
|
this.subject = subject;
|
}
|
|
public int getEmp_id() {
|
return emp_id;
|
}
|
|
public void setEmp_id(int emp_id) {
|
this.emp_id = emp_id;
|
}
|
}
|