package com.yc.ship.module.miniapplet.controller.admin.content.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;

@Schema(description = "管理后台 - 目录内容 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ContentRespVO {

    @Schema(description = "内容主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10566")
    @ExcelProperty("内容主键ID")
    private Long id;

    @Schema(description = "内容名称", example = "李四")
    @ExcelProperty("内容名称")
    private String name;

    @Schema(description = "内容副标题")
    @ExcelProperty("内容副标题")
    private String title;

    @Schema(description = "文章内容")
    @ExcelProperty("文章内容")
    private String content;

    @Schema(description = "目录ID", example = "20092")
//    @ExcelProperty("目录ID")
    private Long catalogueId;

    @Schema(description = "目录名称", example = "20092")
    @ExcelProperty("目录名称")
    private String catalogueName;

    @Schema(description = "文章介绍")
    @ExcelProperty("文章介绍")
    private String introduce;

    @Schema(description = "关键词")
    @ExcelProperty("关键词")
    private String keyword;

    @Schema(description = "封面图")
    @ExcelProperty("封面图")
    private String cover;

    @Schema(description = "视频")
    @ExcelProperty("视频")
    private String video;

    @Schema(description = "外部链接", example = "https://www.iocoder.cn")
    @ExcelProperty("外部链接")
    private String url;

    @Schema(description = "发布状态 0未发布 1已发布", example = "2")
    @ExcelProperty(value = "发布状态", converter = DictConvert.class)
    @DictFormat("release_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer releaseStatus;

    @Schema(description = "发布时间")
    @ExcelProperty("发布时间")
    private LocalDateTime releaseTime;

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

}
