package com.liquidnet.service.adam.dto.vo;

import com.liquidnet.service.adam.entity.AdamMember;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@ApiModel(value = "AdamMemberVo", description = "会员")
@Data
public class AdamMemberVo implements java.io.Serializable, Cloneable {
    private static final long serialVersionUID = -3480288014645762321L;
    @ApiModelProperty(position = 0, value = "会员ID[50]")
    private String memberId;
    @ApiModelProperty(position = 1, value = "会员名称[50]", example = "摩登天空会员卡")
    private String name;
    @ApiModelProperty(position = 2, value = "会员标题[50]", example = "摩登天空会员卡")
    private String title;
    @ApiModelProperty(position = 3, value = "会员副标题[50]", example = "摩登天空会员卡副标题")
    private String subTitle;
    @ApiModelProperty(position = 4, value = "icon图标[200]", example = "https://img.zhengzai.tv/files/2020/08/28/5f490418d30b4.png")
    private String icon;
    @ApiModelProperty(position = 5, value = "会员头像[200]", example = "https://img.zhengzai.tv/files/2020/08/31/5f4c75095e9bc.png")
    private String avatar;
    @ApiModelProperty(position = 6, value = "起始编号", example = "10000")
    private Integer startNo;
    @ApiModelProperty(position = 7, value = "会员类型:1-VIP会员", example = "1")
    private Integer type;
    @ApiModelProperty(position = 6, value = "权益详情[200]", example = "加入摩登天空会员您可享受到.....")
    private String interestsDetail;
    @ApiModelProperty(position = 7, value = "注意事项[200]", example = "摩登天空会员需注意以下事项.....")
    private String notes;
    @ApiModelProperty(position = 8, value = "是否展示须知[200]", example = "0")
    private Integer isNotice;
    @ApiModelProperty(position = 9, value = "会员须知内容[200]", example = "会员须知细则1.xxxx\n2.xxxx")
    private String noticeInfo;
    @ApiModelProperty(position = 10, value = "会员须知标题[200]", example = "摩登天空会员须知")
    private String noticeTitle;
    @ApiModelProperty(position = 11, value = "是否需要答题[200]", example = "0")
    private Integer needQuestion;
    @ApiModelProperty(position = 12, value = "是否展示协议[200]", example = "0")
    private Integer displayAgreement;
    @ApiModelProperty(position = 13, value = "状态[1-NORMAL,2-INVALID]")
    private Integer state;
    @ApiModelProperty(position = 14, value = "限购数量，0不限购[200]", example = "0")
    private Integer limitation;

    @ApiModelProperty(position = 20, value = "会员卡价格信息")
    private List<AdamMemberPriceVo> priceVoList;
    @ApiModelProperty(position = 21, value = "会员专属权益")
    private List<AdamMemberRightsVo> rightsVoList;
    @ApiModelProperty(position = 22, value = "用户会员信息")
    private AdamUserMemberVo userMemberVo;
    @ApiModelProperty(position = 23, value = "购买会员限制[0-名额已满|1-允许购买]")
    private Integer buySwitch;

    private static final AdamMemberVo obj = new AdamMemberVo();

    public static AdamMemberVo getNew() {
        try {
            return (AdamMemberVo) obj.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return new AdamMemberVo();
    }

    public AdamMemberVo copy(AdamMember source) {
        if (null == this) return this;
        this.setMemberId(source.getMemberId());
        this.setName(source.getName());
        this.setTitle(source.getTitle());
        this.setSubTitle(source.getSubTitle());
        this.setIcon(source.getIcon());
        this.setAvatar(source.getAvatar());
        this.setStartNo(source.getStartNo());
        this.setType(source.getType());
        this.setInterestsDetail(source.getInterestsDetail());
        this.setNotes(source.getNotes());
        this.setIsNotice(source.getIsNotice());
        this.setNoticeInfo(source.getNoticeInfo());
        this.setNoticeTitle(source.getNoticeTitle());
        this.setNeedQuestion(source.getNeedQuestion());
        this.setDisplayAgreement(source.getDisplayAgreement());
        this.setState(source.getState());
        this.setLimitation(source.getLimitation());
        return this;
    }
}
