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

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

@Data
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@HeadRowHeight(25)
@ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@ColumnWidth(12)
@ContentRowHeight(15)
@HeadFontStyle(fontHeightInPoints =9)
@ExcelIgnoreUnannotated
public class ParkingTeamVehicleExcelVO {

    /**
     * 团队车名称
     */
    @ExcelProperty("团队车位名称")
    @ApiModelProperty(name = "teamName", value = "团队车位名称")
    private String teamName;

    /**
     * 企业ID
     */
    @ExcelIgnore
    @ApiModelProperty(name = "companyId", value = "企业ID")
    private Long companyId;

    /**
     * 所属企业
     */
    @ExcelProperty("所属企业")
    @ApiModelProperty(name = "companyName", value = "所属企业")
    private String companyName;

    /**
     * 共享车位数（0：动态车位数 ，其他数字为限定车位数）
     */
    @ExcelProperty("当前共享车位数")
    @ApiModelProperty(name = "amount", value = "共享车位数（0：动态车位数 ，其他数字为限定车位数）")
    private Integer amount;

    /**
     * 车辆限制数
     */
    @ExcelProperty("车辆限制数")
    @ApiModelProperty(name = "limitAmount", value = "车辆限制数")
    private Integer limitAmount;

    /**
     * 已添加车辆数量
     */
    @ExcelProperty("已添加车辆数量")
    @ApiModelProperty(name = "vehicleNumber", value = "已添加车辆数量")
    private Integer vehicleNumber;

    /**
     * 团队车位描述
     */
    @ExcelProperty("团队车位描述")
    @ApiModelProperty(name = "remark", value = "团队车位描述")
    private String remark;

    /**
     * 共享状态（1：未生效，2：生肖中，3：已失效）
     */
    @ExcelIgnore
    @ApiModelProperty(name = "shareStatus", value = "共享状态（1：未生效，2：生效中，3：已失效）")
    private Integer shareStatus;

    /**
     * 共享状态（1：未生效，2：生肖中，3：已失效）
     */
    @ExcelProperty("共享状态")
    @ApiModelProperty(name = "shareStatusStr", value = "共享状态（1：未生效，2：生效中，3：已失效）")
    private String shareStatusStr;

    public void setShareStatusStr(int shareStatus) {
        switch (shareStatus){
            case 1:
                this.shareStatusStr = "未生效";
                break;
            case 2:
                this.shareStatusStr = "生效中";
                break;
            case 3:
                this.shareStatusStr = "已失效";
                break;
            default:
                this.shareStatusStr = "未知";
                break;
        }
    }

}


