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

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

/**
 * @author otto
 */

@Data
@ApiModel("会员聚合更新对象")
public class ZoneMemberUpdateVo {

    @ApiModelProperty(value = "会员名称")
    private String name;
    @ApiModelProperty(value = "会员头像")
    private String imageUrl;
    @ApiModelProperty(value = "会员介绍")
    private String introduction;
    @ApiModelProperty(value = "专区会员类型")
    private Long memberTypeId;
    @ApiModelProperty(value = "专区会员身份")
    private Long memberLevelId;

    @ApiModelProperty(value = "顺序")
    private Integer order;

    public ZoneMember toZoneMember(Long id) {
        ZoneMember zoneMember = new ZoneMember();
        zoneMember.setId(id);
        zoneMember.setName(this.name);
        zoneMember.setImageUrl(this.imageUrl);
        zoneMember.setIntroduction(this.introduction);
        zoneMember.setMemberTypeId(this.memberTypeId);
        zoneMember.setMemberLevelId(this.memberLevelId);
        return zoneMember;
    }
}
