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

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

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("会员聚合身份更新对象")
public class ZoneMemberLevelUpdateVo {
    @ApiModelProperty(value = "专区会员身份Id", required = true)
    @NotNull
    private Long id;
    @ApiModelProperty(value = "专区会员身份顺序")
    private Integer order;
    @ApiModelProperty(value = "专区会员身份名称")
    private String name;

    public ZoneMemberLevel toZoneMemberLevel() {
        ZoneMemberLevel zoneMemberLevel = new ZoneMemberLevel();
        zoneMemberLevel.setId(id);
        zoneMemberLevel.setName(name);
        return zoneMemberLevel;
    }
}
