package com.rf.psychological.scale.dao.model;

import com.rf.psychological.base.model.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Author:zzf
 * @Date:2022/8/19:08:57
 * @Description:userId--openid
 */
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_scale_external_source")
@EqualsAndHashCode(callSuper=true)
@org.hibernate.annotations.Table(appliesTo = "t_scale_external_source", comment = "量表外部来源信息表")
public class ScaleExternalSourceEntity extends BaseEntity {
    @Column(name = "uid",columnDefinition = "varchar(36) not null comment '外部用户标识'")
    private String uid;
    @Column(name = "source",columnDefinition = "int(4) default 0 comment '来源标识：0-微博；1-微信'")
    private int source;
    @Column(name = "flag", columnDefinition = "varchar(50) not null comment '标识：所属量表'")
    private String flag;
    @Column(name = "user_id",columnDefinition = "varchar(36) not null comment '关联用户id'")
    private String userId;
    @Column(name = "result_id",columnDefinition = "varchar(36) not null comment '报告Id'")
    private String resultId;
    @Column(name = "create_time",columnDefinition = "timestamp default current_timestamp comment '创建时间'")
    private Date createTime;
    @Column(name = "update_time",columnDefinition = "timestamp comment '更新时间'")
    private Date updateTime;

}
