package com.gxwebsoft.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
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 2025-04-24 20:52:13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopCategory对象", description = "商品分类")
public class ShopCategory implements Serializable {
    private static final long serialVersionUID = 1L;

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

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

    @Schema(description = "菜单名称")
    private String title;

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

    @Schema(description = "标识")
    private String code;

    @Schema(description = "链接地址")
    private String path;

    @Schema(description = "组件地址")
    private String component;

    @Schema(description = "打开位置")
    private String target;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "banner")
    private String banner;

    @Schema(description = "图标颜色")
    private String color;

    @Schema(description = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
    private Integer hide;

    @Schema(description = "可见类型 0所有人 1登录可见 2密码可见")
    private Integer permission;

    @Schema(description = "访问密码")
    private String password;

    @Schema(description = "位置 0不限 1顶部 2底部")
    private Integer position;

    @Schema(description = "仅在顶部显示")
    private Integer top;

    @Schema(description = "仅在底部显示")
    private Integer bottom;

    @Schema(description = "菜单选中的path")
    private String active;

    @Schema(description = "其它路由元信息")
    private String meta;

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

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

    @Schema(description = "商户ID")
    private Long merchantId;

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

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

    @Schema(description = "推荐")
    private Integer recommend;

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

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

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

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

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

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

}
