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-05-01 00:36:45
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopGoodsCategory对象", description = "商品分类")
public class ShopGoodsCategory implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "商品分类ID")
    @TableId(value = "category_id", type = IdType.AUTO)
    private Integer categoryId;

    @Schema(description = "分类标识")
    private String categoryCode;

    @Schema(description = "分类名称")
    private String title;

    @Schema(description = "类型 0商城分类 1外卖分类")
    private Integer type;

    @Schema(description = "分类图片")
    private String image;

    @Schema(description = "上级分类ID")
    private Integer parentId;

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

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

    @Schema(description = "绑定的页面")
    private Integer pageId;

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

    @Schema(description = "商品数量")
    private Integer count;

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

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

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

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

    @Schema(description = "是否显示在首页")
    private Integer showIndex;

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

    @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;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
