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 ZoneMemberTypeUpdateVo {

    @ApiModelProperty(value = "专区会员类别Id", required = true)
    @NotNull
    private Long id;
    @ApiModelProperty(value = "专区会员类别名称")
    private String name;
    @ApiModelProperty(value = "专区会员类别简介")
    private String introduction;
    @ApiModelProperty(value = "顺序")
    private Integer order;

    public ZoneMemberType toZoneMemberType() {
        ZoneMemberType zoneMemberType = new ZoneMemberType();
        zoneMemberType.setId(id);
        zoneMemberType.setIntroduction(introduction);
        zoneMemberType.setName(name);
        return zoneMemberType;
    }
}
