package com.yuchen.saas.parking.api.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.*;
import com.thinkunion.park.service.common.enums.parking.DiscountTypeEnum;
import com.yuchen.saas.parking.api.util.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

import java.util.Date;

/**
 * @Description 优惠券列表导出excel
 */
@Data
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@HeadRowHeight(25)
@ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@ColumnWidth(12)
@ContentRowHeight(15)
@HeadFontStyle(fontHeightInPoints =9)
@ExcelIgnoreUnannotated
public class ParkingCouponRecordExcelVo {

    @ExcelProperty("车牌号")
    @ApiModelProperty(name = "车牌号", value = "车牌号")
    private String plateNo;

    @ApiModelProperty(value = "优惠数值")
    private Integer discountNumber;

    @ExcelProperty("减免金额(单位:元)")
    @ApiModelProperty(value = "减免金额()")
    private String discountNumberStr;

    @ExcelProperty("使用时间")
    @ApiModelProperty("使用时间")
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;



    public String getDiscountNumberStr(){
        return StringUtil.formatFenToYuan(discountNumber);
    }

}
