package com.ywt.outpatient.domain.entity.center;

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

@Entity
@Table(name = "sms")
public class Sms {
    @Id
    private Integer id;

    /**
     * 用户Id
     */
    @Column(name = "user_id", nullable = false)
    private Integer userId;

    /**
     * 手机号
     */
    @Column(name = "mobile")
    private String mobile;

    /**
     * 发送状态
     */
    @Column(name = "send_status", nullable = false)
    private Integer sendStatus;

    /**
     * 短信类型（1-验证码，2-短信通知，3-推广短信）
     */
    private Integer type;

    /**
     * 阿里云短信服务模板参数（JSON格式，eg. {"code", "876210"}）
     */
    private String data;

    /**
     * 阿里云短信服务模板 CODE
     */
    @Column(name = "template_code")
    private String templateCode;

    /**
     * 内容
     */
    private String content;

    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = false)
    private Date createTime;

    /**
     * 短信分组
     */
    @Column(name = "sms_group", nullable = false)
    private Integer group;

    /**
     * 阿里云返回：请求ID
     */
    @Column(name = "request_id")
    private String requestId;

    /**
     * 阿里云返回：状态码-返回OK代表请求成功,其他错误码详见错误码列表
     */
    @Column(name = "code")
    private String code;

    /**
     * 阿里云返回：状态码的描述
     */
    @Column(name = "message")
    private String message;

    /**
     * 阿里云返回：发送回执ID,可根据该ID查询具体的发送状态
     */
    @Column(name = "biz_id")
    private String bizId;

    /**
     * 是否删除（标识物理删除）
     */
    @Column(name = "deleted", nullable = false)
    private boolean deleted;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getSendStatus() {
        return sendStatus;
    }

    public void setSendStatus(Integer sendStatus) {
        this.sendStatus = sendStatus;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getGroup() {
        return group;
    }

    public void setGroup(Integer group) {
        this.group = group;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getBizId() {
        return bizId;
    }

    public void setBizId(String bizId) {
        this.bizId = bizId;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }
}
