package com.liquidnet.service.goblin.dto.manage;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.liquidnet.commons.lang.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@ApiModel("商家端-编辑艺人专题入参")
@Data
public class GoblinStoreMgtArtistTopicUpdateParams implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(required = true, value = "专题ID")
    @NotBlank(message = "专题ID不能为空")
    private String topicId;

    @ApiModelProperty(required = true, value = "专题名称")
    @NotBlank(message = "专题名称不能为空")
    @Size(max = 100, message = "专题名称长度超限")
    private String topicName;

    @ApiModelProperty(value = "关联艺人ID，非必填；传空字符串表示清空")
    private String artistId;

    @ApiModelProperty(value = "未关联艺人时的自定义头像；有艺人时忽略")
    @Size(max = 500, message = "自定义头像地址长度超限")
    private String customAvatarUrl;

    @ApiModelProperty(value = "模版类型 1双列 2单列")
    @NotNull(message = "模版类型不能为空")
    private Integer templateType;

    @ApiModelProperty(value = "专题banner")
    private String bannerUrl;

    @ApiModelProperty(value = "banner高度")
    private Integer bannerHeight;

    @ApiModelProperty(value = "上架开始时间[yyyy-MM-dd HH:mm:ss]")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
    private LocalDateTime onSaleStart;

    @ApiModelProperty(value = "上架结束时间[yyyy-MM-dd HH:mm:ss]")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
    private LocalDateTime onSaleEnd;

    @ApiModelProperty(value = "专题商品，全量替换")
    @Valid
    private List<GoblinStoreMgtArtistTopicGoodsItemParams> goods;
}
