package shop.alien.entity.second;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 二手商品类别表
 */
@Data
@JsonInclude
@TableName("second_goods_category")
public class SecondGoodsCategory implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Integer id;

    @TableField("category_name")
    @ApiModelProperty(value = "类别名称")
    private String categoryName;

    @TableField("category_url")
    @ApiModelProperty(value = "类别图片URL")
    private String categoryUrl;

    @TableField("parent_id")
    @ApiModelProperty(value = "上级ID")
    private Integer parentId;

    @TableField("delete_flag")
    @ApiModelProperty(value = "删除标记 0:未删除 1:已删除")
    @TableLogic
    private Integer deleteFlag;

    @TableField("category_sort")
    @ApiModelProperty(value = "排序")
    private Integer categorySort;

    @TableField("category_state")
    @ApiModelProperty(value = "状态 0：显示 1：隐藏")
    private String categoryState;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

    @TableField("created_user_id")
    @ApiModelProperty(value = "创建人ID")
    private Integer createdUserId;

    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date updatedTime;

    @TableField("updated_user_id")
    @ApiModelProperty(value = "修改人ID")
    private Integer updatedUserId;

    @TableField(exist = false)
    private List<SecondGoodsCategory> children = null;
}