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

import com.backendsys.modules.cms.article.entity.ArticleI18n;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@TableName("cms_page_i18n")
public class PageI18n {

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

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

    @TableId(type = IdType.AUTO)
    private Long id;
    @NotEmpty(message="内容标识不能为空", groups = { Create.class })
    private String page_sign;
    @Size(max = 20, message = "内容标题长度不超过 {max} 字符", groups = { Create.class, Update.class })
    @NotBlank(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;

}
