/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package cn.ysk.cashier.vo;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class ShopUserInfoVo implements Serializable {
    private Integer id;
    private Integer userId;
    private String headImg;
    private String nickName;
    private Object sex;
    private BigDecimal amount;

    private Integer totalScore;
    private String telephone;
    private String birthDay;
    private Integer isVip;
    private long createAt;
    private long lastLoginAt;

    private BigDecimal inMoney;
    private Integer orderNumber;

    public Object getSex() {
        return sex;
    }

    public void setSex(Object sex) {
        if (sex == null) {
            this.sex="未知";
        }else if(sex.equals(1)){
            this.sex = "男";
        }else if(sex.equals(0)){
            this.sex = "女";
        }
    }

    // 无参构造函数
    public ShopUserInfoVo() {
    }

//    private ShopUserInfoVo(Integer id, String headImg, String nickName, Object sex, BigDecimal amount, Integer totalScore, String telephone, String birthDay, Integer isVip, long createAt, long lastLoginAt) {
//        this.id = id;
//        this.headImg = headImg;
//        this.nickName = nickName;
//        setSex(sex);
//        this.amount = amount;
//        this.totalScore = totalScore;
//        this.telephone = telephone;
//        this.birthDay = birthDay;
//        this.isVip = isVip;
//        this.createAt = createAt;
//        this.lastLoginAt = lastLoginAt;
//    }
}