package com.pj.project.tb_fee_details;

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

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.experimental.Accessors;

/**
 * Model: tb_fee_details -- 收费明细表
 * @author lzm 
 */
@Data
@Accessors(chain = true)
@TableName(TbFeeDetails.TABLE_NAME)
@EqualsAndHashCode(callSuper = false)
public class TbFeeDetails implements Serializable {

	// ---------- 模块常量 ----------
	/**
	 * 序列化版本id 
	 */
	private static final long serialVersionUID = 1L;	
	/**
	 * 此模块对应的表名 
	 */
	public static final String TABLE_NAME = "tb_fee_details";	
	/**
	 * 此模块对应的权限码 
	 */
	public static final String PERMISSION_CODE = "tb-fee-details";	


	// ---------- 表中字段 ----------
	/**
	 * 主键 
	 */
	private String id;

    private String businessId;

	/**
	 * 业务单号 
	 */
    private String businessNo;

	/**
	 * 车牌号 
	 */
    private String carNo;

    /**
     * 收费类型
     */
    private Integer feeType;

    /**
	 * 业务类型id 
	 */
    private String itemTypeId;

	/**
	 * 业务类型 
	 */
    private String itemTypeName;

	/**
	 *  业务项 id
	 */
    private String itemId;

	/**
	 * 业务项 
	 */
    private String itemName;

	/**
	 * 项目金额(元) 
	 */
    private BigDecimal itemPrice = new BigDecimal(0);

	/**
	 * 支付日期 
	 */
    private String payDay;


    private String payTime;

	/**
	 * 支付方式(3=微信支付) 
	 */
    private Integer payType;


	/**
	 * 创建时间 
	 */
    private Date createTime;

    private String businessItemId;

    private String businessItemNo;

    private String pickCustomerName;



    /**
     * 不含税款
     */
    private BigDecimal noTaxPrice = new BigDecimal(0);

    /**
     * 税款
     */
    private BigDecimal taxPrice = new BigDecimal(0);

    /**
     * 税率
     */
    private BigDecimal taxRate = new BigDecimal(0);


    /**
     * 单价
     */
    private BigDecimal unitPrice = new BigDecimal(0);

    /**
     * 重量
     */
    private Double weight;

    /**
     * 数量
     */
    private Integer num = 0;

    /**
     * 是否结算(0=未结算, 1=已结算)
     */
    private Integer isSettle;

    /**
     * 支付方式(1=直接支付)
     */
    private Integer payMode;

    /**
     * 备注
     */
    private String remark;

    /**
     * 发票
     */
    private String invoice;

    /**
     * 微信支付订单号
     */
    private String transactionId;

    /**
     *
     */
    private String businessCarId;

    private String businessCarNo;
    private String outTradeNo;



    @Getter
    @AllArgsConstructor
    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
    public static enum fee{
        NUCLEIC_FEE(1,"核酸检测"),
        DISINFECT_FEE(2,"消杀作业"),
        STEVEDORE_FEE(3,"装卸作业"),
        PARK_FEE(4,"停车费"),
        WEIGHT_FEE(5,"过磅费"),
        MANAGE_FEE(6, "入场管理费"),
        CHARGE_FEE(7, "充电打冷作业");
        private int code;
        private String desc;

        public static String getDesc(int code){
            fee[] fees = values();
            for (fee fee : fees) {
                if(fee.getCode() == code){
                    return fee.getDesc();
                }
            }
            return null;
        }
    }


	


}
