package com.yc.ship.module.miniapplet.controller.app.advert.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 com.yc.ship.module.miniapplet.controller.admin.advert.vo.AdvertRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Schema(description = "小程序接口 - 广告 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppAdvertRespVO {
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16726")
    private Long id;

    @Schema(description = "广告位id", requiredMode = Schema.RequiredMode.REQUIRED, example = "25367")
    private Long adsenseId;

    @Schema(description = "广告位", requiredMode = Schema.RequiredMode.REQUIRED, example = "25367")
    @ExcelProperty("广告位名称")
    private String adsenseName;

    @Schema(description = "媒体类型：0单图片、1单视频", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer adsenseType;

    @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("排序号")
    private Integer sort;

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

    @Schema(description = "副标题")
    @ExcelProperty("副标题")
    private String subTitle;

    @Schema(description = "上传图片地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
    @ExcelProperty("上传图片地址")
    private String advertUrl;

    @Schema(description = "链接类型 0.不跳转 1.航线 2.文章列表 3.单文章", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "链接类型 0.不跳转 1.航线 2.文章列表 3.单文章 Advert_Link_Type", converter = DictConvert.class)
    @DictFormat("advert_link_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer linkType;

    @Schema(description = "跳转对象，航线ID|文章栏目ID|文章ID", example = "https://www.iocoder.cn")
    @ExcelProperty("跳转对象")
    private String linkUrl;



}
