package cn.reghao.tnb.message.app.model.po;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import lombok.Getter;
import lombok.Setter;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

/**
 * @author reghao
 * @date 2021-03-18 21:01:46
 */
@Setter
@Getter
public class Webhook extends BaseObject<Integer> {
    @NotBlank
    @Size(min = 3, max = 10, message = "name 长度在 3 ~ 10 个字符之间")
    private String name;
    @NotBlank
    @Pattern(regexp = "(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]", message = "url 格式不正确")
    private String url;
    @NotNull
//    @NotBlank
    @Size(min = 1, max = 255, message = "sign 长度应小于 255 个字符")
    private String sign;
}
