package com.gxwebsoft.cms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 页面管理记录表
 *
 * @author 科技小王子
 * @since 2024-09-10 20:47:57
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsDesign对象", description = "页面管理记录表")
public class CmsDesign implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "page_id", type = IdType.AUTO)
    private Integer pageId;

    @Schema(description = "页面")
    private String name;

    @Schema(description = "所属栏目ID")
    private Integer categoryId;

    @Schema(description = "所属栏目")
    @TableField(exist = false)
    private String categoryName;

    @Schema(description = "页面模型")
    private String model;

    @Schema(description = "页面关键词")
    private String keywords;

    @Schema(description = "页面描述")
    private String description;

    @Schema(description = "路由地址")
    @TableField(exist = false)
    private String path;

    @Schema(description = "组件路径")
    @TableField(exist = false)
    private String component;

    @Schema(description = "缩列图")
    private String photo;

    @Schema(description = "购买链接")
    private String buyUrl;

    @Schema(description = "页面样式")
    private String style;

    @Schema(description = "页面内容")
    private String content;

    @Schema(description = "是否开启布局")
    private Boolean showLayout;

    @Schema(description = "页面布局")
    @TableField(exist = false)
    private String layout;

    @Schema(description = "是否显示banner")
    private Boolean showBanner;

    @Schema(description = "是否显示Button")
    private Boolean showButton;

    @Schema(description = "上级id, 0是顶级")
    private Integer parentId;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "国际化语言")
    private String lang;

    @Schema(description = "用于同步翻译内容")
    @TableField(exist = false)
    private Integer langCategoryId;

    @Schema(description = "是否启用自动翻译")
    private Boolean translation;

    @Schema(description = "设为首页")
    private Integer home;

    @Schema(description = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}
