package com.repair.model.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.repair.model.enumModel.eRecordStatu;
import com.repair.model.enumModel.eSchool;
import lombok.Data;

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

/**
 * @Author: binguo
 * @Date: 2023/11/1 星期三 16:20
 * @Description: com.repair.model.vo
 * @Version: 1.0
 */
@Data
public class PrintVo {
    /**
     * 打印时间
     */
    private Date printTime;

    /**
     * 操作人
     */
    private String operator;

    /**
     * 工单号
     */
    private String recordNo;

    /**
     * 报修人
     */
    private String userName;

    /**
     * 年级
     */
    private String userClass;

    /**
     * 手机
     */
    private String userPhone;

    /**
     * 区域
     */
    private String areaId;

    /**
     * 报修物品
     */
    private String articleName;

    /**
     * 报修时间
     */
    private Date reportTime;

    /**
     * 故障描述
     */
    private String description;

    /**
     * 维修师傅
     */
    private String maintenancerName;

    /**
     * 手机号码
     */
    private String maintenancerPhone;

    /**
     * 状态
     */
    @JsonIgnore
    private Integer maintenanceState;

    /**
     * 状态
     */
    private String state;

    public String getState() {
        return maintenanceState != null ? eRecordStatu.stringOf(maintenanceState) : state;
    }

    public void setState(String state) {
        this.state = state;
    }

    /**
     * 校区ID
     */
    @JsonIgnore
    private Integer schoolId;

    /**
     * 校区名称
     */
    private String schoolName;

    public String getSchoolName() {
        return schoolId != null ? eSchool.stringOf(schoolId) : schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    /**
     * 支付金额
     */
    private BigDecimal price;

    /**
     * 退款金额
     */
    private BigDecimal refund;
}
