package com.gingersoft.gsa.cloud.common.core.member;

import android.text.TextUtils;

import java.io.Serializable;

import lombok.Data;

/**
 * 作者：ELEGANT_BIN
 * 版本：1.6.0
 * 创建日期：2020-07-25
 * 修订历史：2020-07-25
 * 描述：
 */
@Data
public class MemberInfo implements Serializable {

    /**
     * ablediscount : 0
     * birthdaybonusratio : 1
     * birthdayperiod : 5
     * brCouponNum : 0
     * brCouponTypeId : 0
     * brPoints : 5
     * brandId : 0
     * brandName : Gingersoft
     * couponTypeId : 0
     * createBy : H5
     * createTime : {"date":28,"day":4,"hours":17,"minutes":53,"month":4,"seconds":37,"time":1590659617000,"timezoneOffset":-480,"year":120}
     * createTimes : 0
     * creditPoints : 0
     * discount : 0
     * expireAfterDayClearPoints : 0
     * extendExpireAmount : 1
     * extendExpirePeriod : 365
     * extendValidDays : 0
     * foodDesc1 : GS白金會員
     * foodDesc2 : GS白金會員
     * foodDesc3 : GS白金會員
     * foodPrice : 500
     * groupId : 7
     * id : 421439
     * isDisplay : 0
     * isVisible : 1
     * isdefault : 1
     * language : 0
     * level : 0
     * levelDesc : 60日內消費滿3000, 可升級為白金會員享有更多折扣會員享有更多折扣
     * levelName :
     * levelName1 : GS基本用戶
     * levelName2 : 基本用戶
     * levelName3 : 基本用戶
     * levelUpAmount : 1
     * levelUpPeriod : 365
     * negativePoints : 0
     * newCouponNum : 0
     * nextDownLevel : 35
     * nextUpLevel : 0
     * optTime : {"date":25,"day":6,"hours":9,"minutes":48,"month":6,"seconds":50,"time":1595641730781,"timezoneOffset":-480,"year":120}
     * optTimes : 0
     * pointRedeemCash : 20
     * pointRule : 2
     * pointUnit : 1
     * pointenddate :
     * pointoveryear : 0
     * points : 0
     * pointsVariable : 50
     * restaurantId : 2
     * scCharge : 0
     * seq1 : 3
     * sid :
     * updateBy : H5
     * updateTime : {"date":23,"day":4,"hours":17,"minutes":33,"month":6,"seconds":14,"time":1595496794000,"timezoneOffset":-480,"year":120}
     * updateTimes : 0
     * vaildDays : 0
     * adverHeight : 0
     * advertCol : 1
     * birthday :
     * birthdays :
     * brandImgUrl : http://m.ricepon.com/1/20160816/20160816133220847.png
     * brandMemberInfoIcon : http://m.ricepon.com/ricepon-asset/images/1546398451087.png
     * consumeAmount : 0
     * consumePoints : 3
     * countryId : 0
     * districtId : 0
     * districtName :
     * email :
     * emailActive : 0
     * headImg :
     * imgPath :
     * isPush : 0
     * levelImgUrl : http://m.ricepon.com/ricepon-asset/201912/member/member-1575525134386.jpg
     * levelTime :
     * memberDiscount : 20
     * memberExpireDate : {"date":25,"day":6,"hours":9,"minutes":48,"month":6,"seconds":50,"time":1595641730781,"timezoneOffset":-480,"year":120}
     * memberId : 0
     * memberName :
     * memberNo : 2005149175337
     * memberNote :
     * memberPoint : 3
     * memberTypeId : 32
     * openId :
     * password :
     * phone : 18218743523
     * postcardNo :
     * postcardType : 1
     * proId : 0
     * proName :
     * secretKey :
     * serviceOpenId :
     * sex : 0
     * shopCanUse :
     * shopId :
     * shopNote :
     * source : 0
     * status : 0
     * type : 0
     * vaildTime : {"date":25,"day":6,"hours":9,"minutes":48,"month":6,"seconds":50,"time":1595641730781,"timezoneOffset":-480,"year":120}
     * MemberPoint : 3
     */

    private long id;
    private String memberNo;
    /**會員折扣比例*/
    private int memberDiscount;
    //获取会员信息接口
    private float MemberPoint;
    //开台接口返回
    private float memberPoint;
    private String memberName = "";
    private String levelName3;
    private String levelName2;
    private String levelName1;
    private String levelName;
    private String phone;
    private int birthdaybonusratio;
    private int creditPoints;
    private int birthdayperiod;
    private int extendExpirePeriod;
    private int brCouponTypeId;
    private int levelUpPeriod;
    private int groupId;
    private int seq1;
    private int nextDownLevel;
    private int discount;
    private int language;
    private int points;
    private int negativePoints;
    private int couponTypeId;
    private int isdefault;
    private int pointsVariable;
    private String brandName;
    private int level;
    private int newCouponNum;
    private int isVisible;
    private int isDisplay;
    private int vaildDays;
    private int brandId;
    /**積分兌換現金列*/
    private float pointRedeemCash;
    private int ablediscount;
    private float expireAfterDayClearPoints;
    private double extendExpireAmount;
    private String foodDesc3;
    private int scCharge;
    private int extendValidDays;
    private double levelUpAmount;
    private int optTimes;
    private int updateTimes;
    private String foodDesc1;
    private String foodDesc2;
    private String sid;
    private String pointenddate;
    private String updateBy;
    private int brPoints;
    private String optTime;
    private int createTimes;
    private int brCouponNum;
    private int pointRule;
    private int foodPrice;
    private String createBy;
    private int pointoveryear;
    private String levelDesc;
    private int pointUnit;
    private int nextUpLevel;
    private int restaurantId = 2;
    private CreateTimeBean createTime;
    private UpdateTimeBean updateTime;
    private MemberExpireDateBean memberExpireDate;
    private VaildTimeBean vaildTime;




    public String getLevelName(){
        if(!TextUtils.isEmpty(levelName1)) {
            return levelName1;
        }
        if(!TextUtils.isEmpty(levelName2)) {
            return levelName2;
        }
        if(!TextUtils.isEmpty(levelName3)) {
            return levelName3;
        }
        return "";
    }

    public float getMemberPoint() {
        if (MemberPoint != 0) {
            return MemberPoint;
        }
        if (memberPoint != 0) {
            return memberPoint;
        }
        return 0;
    }

    @Data
    public static class CreateTimeBean implements Serializable{
        /**
         * date : 28
         * day : 4
         * hours : 17
         * minutes : 53
         * month : 4
         * seconds : 37
         * time : 1590659617000
         * timezoneOffset : -480
         * year : 120
         */

        private int date;
        private int day;
        private int hours;
        private int minutes;
        private int month;
        private int seconds;
        private long time;
        private int timezoneOffset;
        private int year;

    }

    @Data
    public static class OptTimeBean  implements Serializable{
        /**
         * date : 25
         * day : 6
         * hours : 9
         * minutes : 48
         * month : 6
         * seconds : 50
         * time : 1595641730781
         * timezoneOffset : -480
         * year : 120
         */

        private int date;
        private int day;
        private int hours;
        private int minutes;
        private int month;
        private int seconds;
        private long time;
        private int timezoneOffset;
        private int year;

    }

    @Data
    public static class UpdateTimeBean  implements Serializable{
        /**
         * date : 23
         * day : 4
         * hours : 17
         * minutes : 33
         * month : 6
         * seconds : 14
         * time : 1595496794000
         * timezoneOffset : -480
         * year : 120
         */

        private int date;
        private int day;
        private int hours;
        private int minutes;
        private int month;
        private int seconds;
        private long time;
        private int timezoneOffset;
        private int year;

    }

    @Data
    public static class MemberExpireDateBean  implements Serializable{
        /**
         * date : 25
         * day : 6
         * hours : 9
         * minutes : 48
         * month : 6
         * seconds : 50
         * time : 1595641730781
         * timezoneOffset : -480
         * year : 120
         */

        private int date;
        private int day;
        private int hours;
        private int minutes;
        private int month;
        private int seconds;
        private long time;
        private int timezoneOffset;
        private int year;

    }

    @Data
    public static class VaildTimeBean  implements Serializable{
        /**
         * date : 25
         * day : 6
         * hours : 9
         * minutes : 48
         * month : 6
         * seconds : 50
         * time : 1595641730781
         * timezoneOffset : -480
         * year : 120
         */

        private int date;
        private int day;
        private int hours;
        private int minutes;
        private int month;
        private int seconds;
        private long time;
        private int timezoneOffset;
        private int year;

    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }

    public int getMemberDiscount() {
        return memberDiscount;
    }

    public void setMemberDiscount(int memberDiscount) {
        this.memberDiscount = memberDiscount;
    }

    public void setMemberPoint(float memberPoint) {
        MemberPoint = memberPoint;
    }

    public String getMemberName() {
        if(!TextUtils.isEmpty(memberName)){
            return memberName;
        }
        return getLevelName();
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getLevelName3() {
        return levelName3;
    }

    public void setLevelName3(String levelName3) {
        this.levelName3 = levelName3;
    }

    public String getLevelName2() {
        return levelName2;
    }

    public void setLevelName2(String levelName2) {
        this.levelName2 = levelName2;
    }

    public String getLevelName1() {
        return levelName1;
    }

    public void setLevelName1(String levelName1) {
        this.levelName1 = levelName1;
    }

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getBirthdaybonusratio() {
        return birthdaybonusratio;
    }

    public void setBirthdaybonusratio(int birthdaybonusratio) {
        this.birthdaybonusratio = birthdaybonusratio;
    }

    public int getCreditPoints() {
        return creditPoints;
    }

    public void setCreditPoints(int creditPoints) {
        this.creditPoints = creditPoints;
    }

    public int getBirthdayperiod() {
        return birthdayperiod;
    }

    public void setBirthdayperiod(int birthdayperiod) {
        this.birthdayperiod = birthdayperiod;
    }

    public int getExtendExpirePeriod() {
        return extendExpirePeriod;
    }

    public void setExtendExpirePeriod(int extendExpirePeriod) {
        this.extendExpirePeriod = extendExpirePeriod;
    }

    public int getBrCouponTypeId() {
        return brCouponTypeId;
    }

    public void setBrCouponTypeId(int brCouponTypeId) {
        this.brCouponTypeId = brCouponTypeId;
    }

    public int getLevelUpPeriod() {
        return levelUpPeriod;
    }

    public void setLevelUpPeriod(int levelUpPeriod) {
        this.levelUpPeriod = levelUpPeriod;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public int getSeq1() {
        return seq1;
    }

    public void setSeq1(int seq1) {
        this.seq1 = seq1;
    }

    public int getNextDownLevel() {
        return nextDownLevel;
    }

    public void setNextDownLevel(int nextDownLevel) {
        this.nextDownLevel = nextDownLevel;
    }

    public int getDiscount() {
        return discount;
    }

    public void setDiscount(int discount) {
        this.discount = discount;
    }

    public int getLanguage() {
        return language;
    }

    public void setLanguage(int language) {
        this.language = language;
    }

    public int getPoints() {
        return points;
    }

    public void setPoints(int points) {
        this.points = points;
    }

    public int getNegativePoints() {
        return negativePoints;
    }

    public void setNegativePoints(int negativePoints) {
        this.negativePoints = negativePoints;
    }

    public int getCouponTypeId() {
        return couponTypeId;
    }

    public void setCouponTypeId(int couponTypeId) {
        this.couponTypeId = couponTypeId;
    }

    public int getIsdefault() {
        return isdefault;
    }

    public void setIsdefault(int isdefault) {
        this.isdefault = isdefault;
    }

    public int getPointsVariable() {
        return pointsVariable;
    }

    public void setPointsVariable(int pointsVariable) {
        this.pointsVariable = pointsVariable;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getNewCouponNum() {
        return newCouponNum;
    }

    public void setNewCouponNum(int newCouponNum) {
        this.newCouponNum = newCouponNum;
    }

    public int getIsVisible() {
        return isVisible;
    }

    public void setIsVisible(int isVisible) {
        this.isVisible = isVisible;
    }

    public int getIsDisplay() {
        return isDisplay;
    }

    public void setIsDisplay(int isDisplay) {
        this.isDisplay = isDisplay;
    }

    public int getVaildDays() {
        return vaildDays;
    }

    public void setVaildDays(int vaildDays) {
        this.vaildDays = vaildDays;
    }

    public int getBrandId() {
        return brandId;
    }

    public void setBrandId(int brandId) {
        this.brandId = brandId;
    }

    public float getPointRedeemCash() {
        return pointRedeemCash;
    }

    public void setPointRedeemCash(float pointRedeemCash) {
        this.pointRedeemCash = pointRedeemCash;
    }

    public int getAblediscount() {
        return ablediscount;
    }

    public void setAblediscount(int ablediscount) {
        this.ablediscount = ablediscount;
    }

    public float getExpireAfterDayClearPoints() {
        return expireAfterDayClearPoints;
    }

    public void setExpireAfterDayClearPoints(float expireAfterDayClearPoints) {
        this.expireAfterDayClearPoints = expireAfterDayClearPoints;
    }

    public double getExtendExpireAmount() {
        return extendExpireAmount;
    }

    public void setExtendExpireAmount(double extendExpireAmount) {
        this.extendExpireAmount = extendExpireAmount;
    }

    public String getFoodDesc3() {
        return foodDesc3;
    }

    public void setFoodDesc3(String foodDesc3) {
        this.foodDesc3 = foodDesc3;
    }

    public int getScCharge() {
        return scCharge;
    }

    public void setScCharge(int scCharge) {
        this.scCharge = scCharge;
    }

    public int getExtendValidDays() {
        return extendValidDays;
    }

    public void setExtendValidDays(int extendValidDays) {
        this.extendValidDays = extendValidDays;
    }

    public double getLevelUpAmount() {
        return levelUpAmount;
    }

    public void setLevelUpAmount(double levelUpAmount) {
        this.levelUpAmount = levelUpAmount;
    }

    public int getOptTimes() {
        return optTimes;
    }

    public void setOptTimes(int optTimes) {
        this.optTimes = optTimes;
    }

    public int getUpdateTimes() {
        return updateTimes;
    }

    public void setUpdateTimes(int updateTimes) {
        this.updateTimes = updateTimes;
    }

    public String getFoodDesc1() {
        return foodDesc1;
    }

    public void setFoodDesc1(String foodDesc1) {
        this.foodDesc1 = foodDesc1;
    }

    public String getFoodDesc2() {
        return foodDesc2;
    }

    public void setFoodDesc2(String foodDesc2) {
        this.foodDesc2 = foodDesc2;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getPointenddate() {
        return pointenddate;
    }

    public void setPointenddate(String pointenddate) {
        this.pointenddate = pointenddate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public int getBrPoints() {
        return brPoints;
    }

    public void setBrPoints(int brPoints) {
        this.brPoints = brPoints;
    }

    public String getOptTime() {
        return optTime;
    }

    public void setOptTime(String optTime) {
        this.optTime = optTime;
    }

    public int getCreateTimes() {
        return createTimes;
    }

    public void setCreateTimes(int createTimes) {
        this.createTimes = createTimes;
    }

    public int getBrCouponNum() {
        return brCouponNum;
    }

    public void setBrCouponNum(int brCouponNum) {
        this.brCouponNum = brCouponNum;
    }

    public int getPointRule() {
        return pointRule;
    }

    public void setPointRule(int pointRule) {
        this.pointRule = pointRule;
    }

    public int getFoodPrice() {
        return foodPrice;
    }

    public void setFoodPrice(int foodPrice) {
        this.foodPrice = foodPrice;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public int getPointoveryear() {
        return pointoveryear;
    }

    public void setPointoveryear(int pointoveryear) {
        this.pointoveryear = pointoveryear;
    }

    public String getLevelDesc() {
        return levelDesc;
    }

    public void setLevelDesc(String levelDesc) {
        this.levelDesc = levelDesc;
    }

    public int getPointUnit() {
        return pointUnit;
    }

    public void setPointUnit(int pointUnit) {
        this.pointUnit = pointUnit;
    }

    public int getNextUpLevel() {
        return nextUpLevel;
    }

    public void setNextUpLevel(int nextUpLevel) {
        this.nextUpLevel = nextUpLevel;
    }

    public int getRestaurantId() {
        return restaurantId;
    }

    public void setRestaurantId(int restaurantId) {
        this.restaurantId = restaurantId;
    }

    public CreateTimeBean getCreateTime() {
        return createTime;
    }

    public void setCreateTime(CreateTimeBean createTime) {
        this.createTime = createTime;
    }

    public UpdateTimeBean getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(UpdateTimeBean updateTime) {
        this.updateTime = updateTime;
    }

    public MemberExpireDateBean getMemberExpireDate() {
        return memberExpireDate;
    }

    public void setMemberExpireDate(MemberExpireDateBean memberExpireDate) {
        this.memberExpireDate = memberExpireDate;
    }

    public VaildTimeBean getVaildTime() {
        return vaildTime;
    }

    public void setVaildTime(VaildTimeBean vaildTime) {
        this.vaildTime = vaildTime;
    }
}
