heheng
2024-11-07 37b0d2560607d1e0bfd5247a59a154704cac60f8
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
package com.gkhy.labRiskManage.domain.experiment.entity;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gkhy.labRiskManage.domain.basic.entity.BasicExperimentDevice;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
 
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
 
/**
 * 实验与设备
 */
@EntityListeners(AuditingEntityListener.class)
@Entity
@Table(name = "experiment_and_device")
@Where(clause = "delete_status = 0")
public class ExperimentAndDevice implements Serializable {
    private static final long serialVersionUID = -74398808654954420L;
 
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    /**
     * 实验ID
     */
    @Column(name = "experiment_id")
    private Long experimentId;
    /**
     * 设备ID
     */
    @Column(name = "device_id")
    private Long deviceId;
    /**
     * 使用数量
     */
    private Integer deviceUseCount;
    /**
     * 修改时间
     */
    @JsonFormat
    @LastModifiedDate
    private LocalDateTime updateTime;
    /**
     * 新建时间
     */
    @JsonFormat
    @CreatedDate
    @Column(name = "create_time",updatable = false)
    private LocalDateTime createTime;
    /**
     * 最后修改人
     */
    private Long updateByUserId;
    /**
     * 新建人
     */
    private Long createByUserId;
    /**
     * 删除状态:0-正常;1-已删除
     */
    private Byte deleteStatus;
 
    @ManyToOne(fetch = FetchType.EAGER,cascade = {CascadeType.REFRESH})
    @JoinColumn(name = "device_id",referencedColumnName = "id",insertable =false ,updatable = false)
    private BasicExperimentDevice device;
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public Long getExperimentId() {
        return experimentId;
    }
 
    public void setExperimentId(Long experimentId) {
        this.experimentId = experimentId;
    }
 
    public Long getDeviceId() {
        return deviceId;
    }
 
    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }
 
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }
 
    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
 
    public LocalDateTime getCreateTime() {
        return createTime;
    }
 
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
 
    public Long getUpdateByUserId() {
        return updateByUserId;
    }
 
    public void setUpdateByUserId(Long updateByUserId) {
        this.updateByUserId = updateByUserId;
    }
 
    public Long getCreateByUserId() {
        return createByUserId;
    }
 
    public void setCreateByUserId(Long createByUserId) {
        this.createByUserId = createByUserId;
    }
 
    public Byte getDeleteStatus() {
        return deleteStatus;
    }
 
    public void setDeleteStatus(Byte deleteStatus) {
        this.deleteStatus = deleteStatus;
    }
 
    public Integer getDeviceUseCount() {
        return deviceUseCount;
    }
 
    public void setDeviceUseCount(Integer deviceUseCount) {
        this.deviceUseCount = deviceUseCount;
    }
 
    public BasicExperimentDevice getDevice() {
        return device;
    }
 
    public void setDevice(BasicExperimentDevice device) {
        this.device = device;
    }
}