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

import com.microservices.zone.member.domain.ZoneMemberType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("会员聚合类别输入对象")
public class ZoneMemberTypeInputVo {
    @ApiModelProperty(value = "专区会员类别名称", required = true)
    @NotNull
    private String name;
    @ApiModelProperty(value = "专区会员类别简介", required = true)
    @NotNull
    private String introduction;
    @ApiModelProperty(value = "所属专区", required = true)
    @NotNull
    private Long zoneId;
    @ApiModelProperty(value = "排序")
    private Integer sort;

    public ZoneMemberType toZoneMemberType() {
        ZoneMemberType zoneMemberType = new ZoneMemberType();
        zoneMemberType.setZoneId(zoneId);
        zoneMemberType.setIntroduction(introduction);
        zoneMemberType.setName(name);
        zoneMemberType.setSort(sort);
        return zoneMemberType;
    }
}
