package cn.iocoder.yudao.module.system.dal.dataobject.customersettlement;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo.OtherDeductionsVO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*;

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

/**
 * 结算明细信息 DO
 *
 * @author 符溶馨
 */
@TableName(value = "system_settlement_item", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SettlementItemDO extends BaseDO {

    /**
     * 主键ID
     */
    @TableId
    private Long id;

    /**
     * 结算表ID
     */
    private Long settlementId;

    /**
     * 业务类型 | 1.叉车 2.打包 3.搬运 4.叉车租赁 5.运输
     */
    private Integer businessType;

    /**
     * 预结算金额
     */
    private BigDecimal preSettlementAmount;

    /**
     * 应结算金额
     */
    private BigDecimal shouldSettlementAmount;

    /**
     * 扣款明细
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<OtherDeductionsVO> deductionItems;

    /**
     * 扣款金额
     */
    private BigDecimal deductionAmount;

    /**
     * 结算金额
     */
    private BigDecimal settlementAmount;
}
