yangys
2024-02-02 b82c71a3e3a97a78bd18ff598d27f3062600d22a
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
package com.qianwen.mdc.domain;
 
import java.io.Serializable;
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
/**
 * 工段
 */
@TableName("section")
public class Section implements Serializable {
    /**
     * primary key
     */
    @TableId(type=IdType.ASSIGN_ID)
    private Long id;
 
    /**
     * section name
     */
    private String name;
 
    /**
     * workshop id
     */
    //@Column(name = "workshop_id")
    private Long workshopId;
 
    private static final long serialVersionUID = 1L;
 
    /**
     * 获取primary key
     *
     * @return id - primary key
     */
    public Long getId() {
        return id;
    }
 
    /**
     * 设置primary key
     *
     * @param id primary key
     */
    public void setId(Long id) {
        this.id = id;
    }
 
    /**
     * 获取section name
     *
     * @return name - section name
     */
    public String getName() {
        return name;
    }
 
    /**
     * 设置section name
     *
     * @param name section name
     */
    public void setName(String name) {
        this.name = name;
    }
 
    /**
     * 获取workshop id
     *
     * @return workshop_id - workshop id
     */
    public Long getWorkshopId() {
        return workshopId;
    }
 
    /**
     * 设置workshop id
     *
     * @param workshopId workshop id
     */
    public void setWorkshopId(Long workshopId) {
        this.workshopId = workshopId;
    }
 
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", workshopId=").append(workshopId);
        sb.append("]");
        return sb.toString();
    }
 
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Section other = (Section) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getWorkshopId() == null ? other.getWorkshopId() == null : this.getWorkshopId().equals(other.getWorkshopId()));
    }
 
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getWorkshopId() == null) ? 0 : getWorkshopId().hashCode());
        return result;
    }
}