package com.xunhong.erp.turbo.api.infra.dto.vo;


import com.alibaba.cola.dto.DTO;
import com.xunhong.erp.turbo.api.infra.dto.enums.CategoryTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@Schema(title = "分类响应")
@EqualsAndHashCode(callSuper = true)
public class CategoryVO extends DTO {

	/**
	 * 分类类型
	 */
	@Schema(title = "分类类型", example = "视频")
	public CategoryTypeEnum type;

	/**
	 * 分类id
	 */
	@Schema(title = "分类", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	private Long categoryId;
	/**
	 * 分类名称
	 */
	@Schema(title = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "名称")
	private String name;
	/**
	 * 上级分类id
	 */
	@Schema(title = "上级分类id", example = "名称", type = "string")
	private Long pid;

	/**
	 * 排序号
	 */
	@Schema(title = "排序号", example = "名称", type = "string")
	private Long sort;

	/**
	 * 下级分类
	 */
	@Schema(title = "下级分类")
	private List<CategoryVO> children;

	@Schema(title = "分类关联数量", requiredMode = Schema.RequiredMode.REQUIRED)
	private Integer count;
}
