package com.backendsys.modules.cms.article.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@TableName("cms_article_i18n")
public class ArticleI18n {

    public static interface Detail{}
    public static interface Create{}
    public static interface Update{}
    public static interface Delete{}

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long article_id;
    @NotEmpty(message="语言不能为空", groups = { Create.class, Update.class })
    private String language;

    @Size(max = 100, message = "资讯标题长度不超过 {max} 字符", groups = { Create.class, Update.class })
    @NotEmpty(message="资讯标题不能为空", groups = { Create.class, Update.class })
    private String title;
    @Size(max = 200, message = "资讯描述长度不超过 {max} 字符", groups = { Create.class, Update.class })
    private String description;
    @Size(max = 10000, message = "资讯内容长度不超过 {max} 字符", groups = { Create.class, Update.class })
    @NotEmpty(message="资讯内容不能为空")
    private String content;
    @Size(max = 100, message = "关键词长度不超过 {max} 字符", groups = { Create.class, Update.class })
    private String meta_keyword;
    @Size(max = 200, message = "关键词描述长度不超过 {max} 字符", groups = { Create.class, Update.class })
    private String meta_description;
}
