package com.gxwebsoft.shop.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商家分类
 *
 * @author 科技小王子
 * @since 2024-09-30 13:05:32
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "MerchantCategory对象", description = "商家分类")
@TableName("shop_merchant_category")
public class MerchantCategory implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "分类名称")
    private String title;

    @ApiModelProperty(value = "类型 0商家分类")
    private Integer type;

    @ApiModelProperty(value = "分类图片")
    private String image;

    @ApiModelProperty(value = "上级分类ID")
    private Integer parentId;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "商品数量")
    private Integer count;

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

    @ApiModelProperty(value = "备注")
    private String comments;

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

    @ApiModelProperty(value = "状态, 0正常, 1禁用")
    private Integer status;

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

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

    @ApiModelProperty(value = "注册时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private MerchantCategory parent;

    @TableField(exist = false)
    private List<MerchantCategory> children;

}
