package com.neusoft.smart.pos.dto.member.response;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.math.BigDecimal;
import java.math.RoundingMode;

@Data
@ApiModel
public class DetailedMemberResponse extends MemberResponse {

	private BigDecimal balance; //单位：元
	
	private Integer point;
	
	private Integer cardId;
	
	private String cardNum;  //卡上印刷
	
	private String cardHidCode;  //卡内
	
	private Integer cardActive;  //卡状态

	public void setBalance(Long balance) {
		if (null != balance)
			this.balance = new BigDecimal(balance).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP);//分转元
	}
}
