package com.test.bijihoudaun.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Data
@Schema(name = "分组实体")
@TableName("`grouping`")
public class Grouping implements Serializable {
    @Schema(description = "分组id",implementation = Long.class)
    @TableId(type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @Schema(description ="上级id",implementation = Long.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField("parentId")
    private Long parentId;

    @Schema(description = "分组名称",implementation = String.class)
    @TableField("`grouping`")
    private String grouping;

    @Schema(description = "是否删除 0-未删除 1-已删除", implementation = Integer.class)
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @Schema(description = "删除时间", implementation = Date.class)
    @TableField("deleted_at")
    private Date deletedAt;

    @Schema(description = "删除人ID", implementation = Long.class)
    @TableField("deleted_by")
    private Long deletedBy;
}