lrj
2 天以前 c61d4fe27c97d2ecc907756aa571a4ef14a7b9b6
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
package com.rongyichuang.rating.entity;
 
import com.rongyichuang.common.entity.BaseEntity;
import jakarta.persistence.*;
import org.hibernate.annotations.Where;
 
/**
 * 评分条目实体类
 */
@Entity
@Table(name = "t_rating_item")
@Where(clause = "state = 1")
public class RatingItem extends BaseEntity {
 
    /**
     * 关联的评分模板
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "scheme_id", nullable = false)
    private RatingScheme scheme;
 
    /**
     * 条目名称
     */
    @Column(name = "name", nullable = false, length = 128)
    private String name;
 
    /**
     * 条目最大分值
     */
    @Column(name = "max_score", nullable = false)
    private Integer maxScore;
 
    /**
     * 排序号
     */
    @Column(name = "order_no", nullable = false)
    private Integer orderNo;
 
    // 构造函数
    public RatingItem() {}
 
    public RatingItem(String name, Integer maxScore, Integer orderNo) {
        this.name = name;
        this.maxScore = maxScore;
        this.orderNo = orderNo;
    }
 
    // Getter和Setter方法
    public RatingScheme getScheme() {
        return scheme;
    }
 
    public void setScheme(RatingScheme scheme) {
        this.scheme = scheme;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public Integer getMaxScore() {
        return maxScore;
    }
 
    public void setMaxScore(Integer maxScore) {
        this.maxScore = maxScore;
    }
 
    public Integer getOrderNo() {
        return orderNo;
    }
 
    public void setOrderNo(Integer orderNo) {
        this.orderNo = orderNo;
    }
}