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.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(name = "分组实体")
@TableName("grouping")
public class Grouping {
    @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)
    private String grouping;
}
