package com.jeesharp.business.modules.food.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 企业团餐补贴使用记录实体，映射表 {@code biz_food_company_subsidy_use}。
 *
 * @author jeesharp
 * @since 2026-06-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("biz_food_company_subsidy_use")
public class FoodCompanySubsidyUse extends BaseEntity<FoodCompanySubsidyUse> {

    /**
     * 企业ID
     */
    private String companyId;

    /**
     * 企业员工ID
     */
    private String employeeId;

    /**
     * 会员ID
     */
    private String memberId;

    /**
     * 补贴规则ID
     */
    private String ruleId;

    /**
     * 订餐订单ID
     */
    private String orderId;

    /**
     * 订餐订单号
     */
    private String orderNo;

    /**
     * 用餐日期
     */
    private LocalDate mealDate;

    /**
     * 餐别：BREAKFAST-早餐 LUNCH-午餐 DINNER-晚餐
     */
    private String mealType;

    /**
     * 订单原价金额
     */
    private BigDecimal originalAmount;

    /**
     * 企业折扣优惠金额
     */
    private BigDecimal discountAmount;

    /**
     * 折后应付金额
     */
    private BigDecimal payableAmount;

    /**
     * 企业补贴金额
     */
    private BigDecimal subsidyAmount;

    /**
     * 员工自付金额
     */
    private BigDecimal employeePayAmount;

    /**
     * 状态：0-冻结 1-已使用 2-已取消 3-已退款
     */
    private Integer status;

    /**
     * 冻结时间
     */
    private LocalDateTime frozenTime;

    /**
     * 使用时间
     */
    private LocalDateTime usedTime;

    /**
     * 取消时间
     */
    private LocalDateTime cancelTime;

    /**
     * 退款时间
     */
    private LocalDateTime refundTime;
}
