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

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

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("合作伙伴分类输入对象")
public class ZonePartnersTypeInputVo {
    @ApiModelProperty(value = "合作伙伴分类名称", required = true)
    @NotNull
    private String name;
    @ApiModelProperty(value = "合作伙伴分类顺序", hidden = true)
    private Integer order;
    @ApiModelProperty(value = "所属专区", required = true)
    @NotNull
    private Long zoneId;

    public ZonePartnersType toZonePartnersType() {
        ZonePartnersType zonePartnersType = new ZonePartnersType();
        zonePartnersType.setZoneId(zoneId);
        zonePartnersType.setName(name);
        return zonePartnersType;
    }
}
