package com.xunhong.erp.turbo.biz.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "expense_record")
@EqualsAndHashCode(callSuper = true)
public class ExpenseRecordDO extends BaseDO<ExpenseRecordDO> {

    /**
     * 记录ID
     */
    @TableId(value = "expense_record_id", type = IdType.ASSIGN_ID)
    private Long expenseRecordId;

    /**
     * 记录日期（YYYY-MM-DD）
     */
    @TableField(value = "record_date")
    private LocalDate recordDate;

	/**
	 * 计提车次数量
	 */
	@TableField(value = "total_vehicle_count")
	private Integer totalVehicleCount;

    /**
     * 计提总金额
     */
    @TableField(value = "total_provision")
    private BigDecimal totalProvision;

    /**
     * 花销总额
     */
    @TableField(value = "total_expense")
    private BigDecimal totalExpense;

    /**
     * 日常利润
     */
    @TableField(value = "daily_profit")
    private BigDecimal dailyProfit;

	@TableField(exist = false)
	private List<ExpenseProvisionDO> expenseProvisionDOList;

	@TableField(exist = false)
	private List<ExpenseCostDO> expenseCostDOList;
}

