package com.yc.ship.module.miniapplet.controller.admin.catalogue.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yc.ship.framework.excel.core.annotations.DictFormat;
import com.yc.ship.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 目录类型 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CatalogueRespVO {

    @Schema(description = "目录类型主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27482")
    @ExcelProperty("目录类型主键ID")
    private Long id;

    @Schema(description = "目录名称", example = "芋艿")
    @ExcelProperty("目录名称")
    private String name;

    @Schema(description = "目录编码")
    @ExcelProperty("目录编码")
    private String code;


    @Schema(description = "父级目录", example = "5315")
//    @ExcelProperty("父级目录")
    private Long parentId;

    @Schema(description = "父级目录名称", example = "5315")
    @ExcelProperty("父级目录名称")
    private String parentName;

    @Schema(description = "目录Icon图标")
    @ExcelProperty("Icon图标")
    private String logo;

    @Schema(description = "图片地址")
    @ExcelProperty("头部图片")
    private String imgUrl;


    @Schema(description = "启用状态 0否 1是")
    @ExcelProperty(value = "启用状态", converter = DictConvert.class)
    @DictFormat("use_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer isUse;

    @Schema(description = "是否允许评论 0否 1是")
    @ExcelProperty("是否允许评论")
    @DictFormat("yes_no")
    private Integer isComment;

    @Schema(description = "允许用户发布 0否 1是")
    @ExcelProperty("允许用户发布")
    @DictFormat("yes_no")
    private Integer isRelease;

    @Schema(description = "用户发布审核 0否 1是")
    @ExcelProperty("用户发布审核")
    @DictFormat("yes_no")
    private Integer isAudit;

    @Schema(description = "是否栏目推荐 0否 1是")
    @ExcelProperty("是否栏目推荐")
    @DictFormat("yes_no")
    private Integer isRecommend;


    @Schema(description = "备注", example = "随便")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "排序号")
    @ExcelProperty("排序号")
    private Integer sortNum;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;


}
