endian11
2019-11-27 893bac9ccdf2ce0118f71f0c6732dc08e407d69d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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;
    }
}