package com.iformall.domain.vo;


import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.iformall.domain.po.WxCardInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WxCardVo extends WxCardInfo {

	/** 券类型信息 */
	@io.swagger.annotations.ApiModelProperty(value="封面图",name="coverImg")
	private String coverImg;
    @io.swagger.annotations.ApiModelProperty(value="多封面图",name="coverPicture")
    private String coverPicture;
    @io.swagger.annotations.ApiModelProperty(value="详情多图",name="detailPicture")
    private String detailPicture;

	@Excel(name = "卡名称", width = 20, orderNum = "5")
	@io.swagger.annotations.ApiModelProperty(value="券名称",name="title")
	private String title;
	@io.swagger.annotations.ApiModelProperty(value="副标题",name="subTitle")
	private String subTitle;
	@io.swagger.annotations.ApiModelProperty(value="单位0:钱分，1:小时",name="unit")
	private Integer unit;
	@io.swagger.annotations.ApiModelProperty(value="须知",name="detail")
	private String detail;
	@io.swagger.annotations.ApiModelProperty(value="购买须知",name="remark")
	private String remark;

	public String getPriceStr() {
		return new BigDecimal(price == null ? 0 : price).divide(new BigDecimal(100)).toPlainString();
	}

	@Excel(name = "面额(元)", width = 20, orderNum = "6")
	@TableField(exist = false)
	private String priceStr;


	@io.swagger.annotations.ApiModelProperty(value = "面额", name = "price")
	private Integer price;

	public String getSalePriceStr() {
		return new BigDecimal(salePrice == null ? 0 : salePrice).divide(new BigDecimal(100)).toPlainString();
	}

	@Excel(name = "售价(元)", width = 20, orderNum = "8")
	@TableField(exist = false)
	private String salePriceStr;

	@io.swagger.annotations.ApiModelProperty(value = "购买金额", name = "salePrice")
	private Integer salePrice;
	@io.swagger.annotations.ApiModelProperty(value = "补贴类型", name = "subsidyType")
	private Integer subsidyType;

	public String getSubsidyNumStr() {
		return new BigDecimal(subsidyNum == null ? 0 : subsidyNum).divide(new BigDecimal(100)).toPlainString();
	}

	@Excel(name = "补贴额(元)", width = 20, orderNum = "9")
	@TableField(exist = false)
	private String subsidyNumStr;

	@io.swagger.annotations.ApiModelProperty(value = "补贴金额", name = "subsidyNum")
	private Integer subsidyNum;


	@io.swagger.annotations.ApiModelProperty(value = "购买人ID", name = "cuserId")
	private Long cuserId;
	@io.swagger.annotations.ApiModelProperty(value = "持有者ID", name = "ownerId")
	private Long ownerId;
	@io.swagger.annotations.ApiModelProperty(value = "该订单对应券的实际过期时间 ", name = "expiredTime")
	private Date expiredTime;

	@Excel(name = "状态 ", width = 20, orderNum = "11", replace = {"使用中_4", "已过期_5", "已用完_6", "已线下退款_7"})
	@io.swagger.annotations.ApiModelProperty(value = "状态", name = "status")
	private Integer status;


	@Excel(name = "购买人", width = 20, orderNum = "2")
	@io.swagger.annotations.ApiModelProperty(value="购买人昵称",name="cnickName")
	private String cnickName;

	@Excel(name = "持卡人", width = 20, orderNum = "3")
	@io.swagger.annotations.ApiModelProperty(value="持有人昵称",name="onickName")
	private String onickName;

	@Excel(name = "电话", width = 20, orderNum = "4")
	@io.swagger.annotations.ApiModelProperty(value="持有人绑定的手机号",name="ouPhone")
	private String ouPhone;

	@TableField(exist = false)
	protected List<Integer> statusS;

	@TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value="卡状态",name="statusStr")
	protected String statusStr;

	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startdate")
	private Date startdate;

	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate")
	private Date enddate;
}
