package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 门店字典表 新
 * </p>
 *
 * @author ssk
 * @since 2024-12-26
 */
@Data
@JsonInclude
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("store_dictionary")
@ApiModel(value = "StoreDictionary对象", description = "门店字典表 新")
public class StoreDictionary extends Model<StoreDictionary> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "类型名称")
    @TableField("type_name")
    private String typeName;

    @ApiModelProperty(value = "类型描述")
    @TableField("type_detail")
    private String typeDetail;

    @ApiModelProperty(value = "父词典主键")
    @TableField("parent_id")
    private Integer parentId;

    @ApiModelProperty(value = "字典值id")
    @TableField("dict_id")
    private String dictId;

    @ApiModelProperty(value = "字典描述")
    @TableField("dict_detail")
    private String dictDetail;

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

    @ApiModelProperty(value = "创建时间")
    @TableField("created_time")
    private Date createdTime;

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

    @ApiModelProperty(value = "修改时间")
    @TableField("updated_time")
    private Date updatedTime;

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

    @ApiModelProperty(value = "子节点")
    @TableField(exist = false)
    private List<StoreDictionary> storeDictionaryList;

    @ApiModelProperty(value = "是否隐藏, 0:不隐藏, 1:隐藏")
    @TableField("hidden")
    private Integer hidden;

    @ApiModelProperty(value = "排序ID")
    @TableField("sort_id")
    private Integer sortId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
