package com.izouma.dingdong.domain.backstage;

import com.izouma.dingdong.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.time.LocalDate;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Where(clause = "enabled = 1")
@ApiModel(value = "系统邮件", description = "系统邮件")
public class Email extends BaseEntity {
    @ApiModelProperty(value = "发件人", name = "sendUserId")
    private Long sendUserId;

    //叮咚logo
    private String avatar;

    private String name = "系统消息";

    @ApiModelProperty(value = "收件人", name = "receiveUserId")
    private Long receiveUserId;

    @ApiModelProperty(value = "发送时间", name = "sendTime")
    private LocalDate sendTime;

    @ApiModelProperty(value = "标题", name = "title")
    private String title;

    @ApiModelProperty(value = "内容", name = "content")
    private String content;

    @Column(nullable = false)
    private Boolean enabled = true;

/*    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "消息中心", name = "type")
    private EmailType type;*/
}
