package com.ssm.manage.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ssm.manage.utils.DateUtils;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@Data
@Table(name = "sms_messages_${tab}")
@FieldNameConstants
public class SmsMessages {
    @Id
    private Long id;
    private String phone;
    private String content;
    private Date sendTime;
    private Integer status;
    private String errorMessage;
    private Long storeId;
    private String storeNum;
    private String storeName;
    private String smsAccount;
    private String smsPassword;
    private String smsUrl;
    private Integer smsType;
    @JsonIgnore
    public String getTab(){
        return DateUtils.YMFormat(sendTime);
    }
}
