1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- package cn.efunbox.audio.entity;
- import cn.efunbox.audio.consts.Status;
- import lombok.Data;
- import lombok.ToString;
- import org.hibernate.annotations.DynamicInsert;
- import org.hibernate.annotations.DynamicUpdate;
- import javax.persistence.*;
- import java.io.Serializable;
- import java.sql.Timestamp;
- import java.util.Date;
- /**
- * Created by yao on 17-9-26.
- */
- @Data
- @ToString
- @Entity
- @Table(name = "device")
- @DynamicInsert
- @DynamicUpdate
- public class Device implements Serializable, Cloneable{
- @Id
- @GeneratedValue
- private Long id;
- //新token
- @Column(name = "tokenNew", columnDefinition="varchar(100) comment '新token'")
- private String tokenNew="";
- //旧token,新token被验证后旧token失效
- @Column
- private String tokenOld="";
- //合作渠道编号
- @Column
- private Long idChannel;
- //设备编号串
- @Column
- private Long idDevice;
- //状态
- @Column
- private Integer status;
- //设备的会员有效期
- @Column
- @Temporal(TemporalType.TIMESTAMP)
- private Date valid;
- //上次更新、登陆时间
- @Column
- // @Temporal(TemporalType.TIMESTAMP)
- // private Date updated;
- private Timestamp updated;
- //在资源平台的账号信息,学号
- @Column
- private String iaas_eid;
- //在资源平台的账号信息,uuid
- @Column
- private String iaas_uid;
- //在资源平台的账号信息,设备id
- @Column
- private String iaas_name;
- //在资源平台的账号信息,设备密码
- @Column
- private String iaas_pwd;
- //在资源平台的账号信息,访问token
- @Column
- private String iaas_token;
- //在资源平台的账号信息,访问token过期时间
- @Column
- private Timestamp iaas_expiration;
- //创建时间
- @Column
- // @Temporal(TemporalType.TIMESTAMP)
- // private Date created;
- private Timestamp created;
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
- }
|