Member.java
3.38 KB
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
package com.topdraw.business.basicdata.member.domain;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import lombok.Data;
import lombok.experimental.Accessors;
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.sql.Timestamp;
import java.time.LocalDateTime;
/**
* @author XiangHan
* @date 2021-10-22
*/
@Entity
@Data
@EntityListeners(AuditingEntityListener.class)
@Accessors(chain = true)
@Table(name="uc_member")
public class Member implements Serializable {
// 运营商平台账号
@Transient
private String platformAccount;
// 会员过期时间
@Column(name = "vip_expire_time", nullable = false)
private LocalDateTime vipExpireTime;
// 主键
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
// 标识
@Column(name = "code", nullable = false)
private String code;
// 类型 1:大屏;2:小屏
@Column(name = "`type`", nullable = false)
private Integer type;
// 状态 0:不可用;1:可用
@Column(name = "`status`", nullable = false)
private Integer status;
// 昵称 base64
@Column(name = "nickname")
private String nickname;
// 描述
@Column(name = "description")
private String description;
// 性别 0:女;1:男;-1:未知
@Column(name = "gender", nullable = false)
private Integer gender;
// 生日
@Column(name = "birthday")
private String birthday;
// 头像
@Column(name = "avatar_url")
private String avatarUrl;
// 分组信息
@Column(name = "`groups`")
private String groups;
// 标签
@Column(name = "tags")
private String tags;
// 是否会员 0:非会员;1:会员
@Column(name = "vip", nullable = false)
private Integer vip;
// 会员等级(对应level表的level字段,非id)
@Column(name = "`level`", nullable = false)
private Integer level;
// 成长值
@Column(name = "`exp`")
private Long exp;
// 当前积分
@Column(name = "`points`")
private Long points;
// 即将到期积分(一个月内)
@Column(name = "due_points")
private Long duePoints;
// 优惠券数量
@Column(name = "coupon_amount")
private Long couponAmount;
// 即将过期优惠券数量
@Column(name = "due_coupon_amount")
private Long dueCouponAmount;
// iptv账号id
@Column(name = "user_iptv_id")
private Long userIptvId;
// 绑定IPTV平台 0:未知;1:电信;2:移动;3:联通
@Column(name = "bind_iptv_platform_type")
private Integer bindIptvPlatformType;
// iptv账号绑定时间
@Column(name = "bind_iptv_time")
private Timestamp bindIptvTime;
// 创建时间
@CreatedDate
@Column(name = "create_time")
private Timestamp createTime;
// 更新时间
@LastModifiedDate
@Column(name = "update_time")
private Timestamp updateTime;
// 是否在黑名单 1:是;0否
@Column(name = "black_status")
private Long blackStatus;
public void copy(Member source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
}