package com.microservices.zone.partners.domain.vo;

import com.microservices.zone.partners.domain.ZonePartners;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("合作伙伴更新对象")
public class ZonePartnersUpdateVo {
    @ApiModelProperty(value = "合作伙伴Id", required = true)
    @NotNull
    private Long id;
    @ApiModelProperty(value = "合作伙伴名称", required = true)
    @NotNull
    private String name;
    @ApiModelProperty(value = "合作伙伴跳转链接")
    private String link;
    @ApiModelProperty(value = "合作伙伴图片", required = true)
    @NotNull
    private String logo;
    @ApiModelProperty(value = "合作伙伴顺序")
    private Integer order;

    @ApiModelProperty(value = "所属分类")
    private Long typeId;

    public ZonePartners toZonePartners() {
        ZonePartners zonePartners = new ZonePartners();
        zonePartners.setId(id);
        zonePartners.setLink(link);
        zonePartners.setName(name);
        zonePartners.setLogo(logo);
        zonePartners.setTypeId(typeId);
        return zonePartners;
    }
}
