package com.zksy.dispatch.domain;

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

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

/**
 * 预案分类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "dis_plan_category", schema = "app_user")
public class DisPlanCategory {

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

    @ApiModelProperty("父级ID")
    private Long parentId;

    @ApiModelProperty("分类名称")
    private String label;

    @ApiModelProperty("排序号")
    private Integer sortOrder;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableLogic(value = "0", delval = "2")
    @ApiModelProperty("删除标志（0=正常 2=删除）")
    private String delFlag;

    @TableField(exist = false)
    @ApiModelProperty("子分类列表")
    private List<DisPlanCategory> children;
}
