package com.ltgk.catches.domain.entity;

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

import java.util.Date;
import java.util.List;

/**
 * 水产品字典对象 tp_aquatic_dict
 *
 * @author Qi ChengBin
 * @date 2025-01-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tp_aquatic_dict")
@ApiModel(value = "水产品字典对象", description = "水产品字典表")
public class TpAquaticDict extends Model<TpAquaticDict> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "水产品字典主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "字典名称")
    @TableField(value = "dict_name", condition = SqlCondition.LIKE)
    private String dictName;

    @ApiModelProperty(value = "字典编号")
    @TableField(value = "dict_code")
    private String dictCode;

    @ApiModelProperty(value = "父节点")
    @TableField(value = "parent_id")
    private String parentId;

    @ApiModelProperty(value = "字典种类")
    @TableField(value = "dict_type")
    private String dictType;

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

    @ApiModelProperty(value = "行政区域编码")
    @TableField(value = "area_code")
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    @TableField(value = "area_name")
    private String areaName;

    @TableLogic(delval = "1", value = "0")
    @TableField(value = "del_flag")
    @ApiModelProperty(value = "删除标志: 0-未删除, 1-已删除")
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "create_by")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_at")
    private Date createAt;

    @ApiModelProperty(value = "更新人")
    @TableField(value = "update_by")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_at")
    private Date updateAt;

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

    @ApiModelProperty(value = "子字典")
    @TableField(exist = false)
    List<TpAquaticDict> childDictList;
}
