派生自 projectDept/qhighschool

EricsHu
2023-06-25 bc835f7b8d4ab951999ff7a08bf62d18daa0461e
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;
    
    /** 发送者昵称 */
    @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;
    }
 
}