派生自 projectDept/qhighschool

Administrator
2022-12-02 b968e4a5a2e374d6eec36113e56d02565a57865c
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
package com.qxueyou.scc.msg.model;
 
import java.io.Serializable;
import java.util.Date;
 
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
 
 
/**
 * ÏûÏ¢Óû§±í  ÊµÌå
 * @author ody.yuan
 *
 */
public class MsgChatroomMsg implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /****0¡¢Õý³£ÏûÏ¢£¬1¡¢½øÈëÏûÏ¢£¬2¡¢Í˳öÏûÏ¢£¬3¡¢µãÔÞÏûÏ¢£¬4¡¢Ç©µ½ÏûÏ¢£¬5¡¢³é½±ÏûÏ¢£¨Öн±Ãûµ¥£©£¬7¡¢Îĵµ£¬8¡¢ÉÍ£¬9¡¢×Éѯ***/
    public static final int TYPE_NORMAL = 0, TYPE_ENTER = 1, TYPE_EXIT = 2, TYPE_PRAISE = 3, TYPE_LOTTERY = 4, TYPE_LOTTERY_RESULT = 5, TYPE_DOC = 7, TYPE_REWARD = 8, TYPE_CONSULT = 9;
 
    /** Ö÷¼ü  */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="MSG_ID", unique=true, nullable=false, length=32)
    private Long msgId;
    
    /** ·¿¼äID */
    @Column(name="CHATROOM_ID")
    private String chatroomId;
    
    /** ÏûÏ¢ÀàÐÍ */
    @Column(name="TYPE")
    private Integer type;
    
    /** ÏûÏ¢ÄÚÈÝ */
    @Column(name="CONTENT")
    private String content;
    
    /** ´´½¨ÕßID  */
    @Column(name="SENDER_ID", length=32)
    private String senderId;
    
    /** ·¢ËÍÕßêdzƠ*/
    @Column(name="ALIAS")
    private String alias;
    
    /** ·¢ËÍÕßÍ·Ïñ */
    @Column(name="IMG_PATH")
    private String imgPath;
 
    /**  ´´½¨Ê±¼ä */
    @Column(name="CREATE_TIME")
    private Date createTime;
    
    public static final String USER_TYPE_TEACHER = "1";
    
    public static final String USER_TYPE_USER = "0";
    
    /** Óû§ÀàÐÍ */
    @Column(name="USER_TYPE")
    private String userType;
 
    public Long getMsgId() {
        return msgId;
    }
 
    public void setMsgId(Long msgId) {
        this.msgId = msgId;
    }
 
    public String getChatroomId() {
        return chatroomId;
    }
 
    public void setChatroomId(String chatroomId) {
        this.chatroomId = chatroomId;
    }
 
    public Integer getType() {
        return type;
    }
 
    public void setType(Integer type) {
        this.type = type;
    }
 
    public String getContent() {
        return content;
    }
 
    public void setContent(String content) {
        this.content = content;
    }
 
    public String getSenderId() {
        return senderId;
    }
 
    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }
 
    public String getAlias() {
        return alias;
    }
 
    public void setAlias(String alias) {
        this.alias = alias;
    }
 
    public String getImgPath() {
        return imgPath;
    }
 
    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }
 
    public Date getCreateTime() {
        return createTime;
    }
 
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
 
    public String getUserType() {
        return userType;
    }
 
    public void setUserType(String userType) {
        this.userType = userType;
    }
 
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((chatroomId == null) ? 0 : chatroomId.hashCode());
        result = prime * result + ((senderId == null) ? 0 : senderId.hashCode());
        result = prime * result + ((type == null) ? 0 : type.hashCode());
        return result;
    }
 
    @Override
    public boolean equals(Object obj) {
        if (this == obj){
            return true;
        }
        if (obj == null){
            return false;
        }
        if (getClass() != obj.getClass()){
            return false;
        }
        MsgChatroomMsg other = (MsgChatroomMsg) obj;
        if (chatroomId == null) {
            if (other.chatroomId != null){
                return false;
            }
        } else if (!chatroomId.equals(other.chatroomId)){
            return false;
        }
        if (senderId == null) {
            if (other.senderId != null){
                return false;
            }
        } else if (!senderId.equals(other.senderId)){
            return false;
        }
        if (type == null) {
            if (other.type != null){
                return false;
            }
        } else if (!type.equals(other.type)){
            return false;
        }
        return true;
    }
 
}