package cn.reghao.devops.mgr.admin.model.po;

import cn.reghao.devops.mgr.admin.model.vo.NotifyType;
import cn.reghao.devops.mgr.util.BaseEntity;
import cn.reghao.devops.mgr.util.validator.ValidEnum;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

/**
 * @author reghao
 * @date 2021-03-18 21:01:46
 */
@Setter
@Getter
@Entity
@Table(name = "sys_notify_receiver")
public class NotifyReceiver extends BaseEntity {
    @Column(nullable = false, unique = true)
    private String name;
    @NotBlank
    @ValidEnum(value = NotifyType.class, message = "请选择正确的通知类型")
    private String type;
    @NotBlank
    private String url;
    private String sign;
    private Boolean setdefault;

    public NotifyReceiver() {
        this.setdefault = false;
    }
}
