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;

/**
 * 企业团餐账户流水实体，映射表 {@code biz_food_company_account_log}。
 *
 * @author jeesharp
 * @since 2026-06-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("biz_food_company_account_log")
public class FoodCompanyAccountLog extends BaseEntity<FoodCompanyAccountLog> {

    /**
     * 账户ID
     */
    private String accountId;

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

    /**
     * 变动类型：RECHARGE-充值 FREEZE-冻结 UNFREEZE-解冻 CONSUME-消费 REFUND-退款 ADJUST-调整
     */
    private String changeType;

    /**
     * 变动金额
     */
    private BigDecimal changeAmount;

    /**
     * 变动前可用余额
     */
    private BigDecimal beforeAvailableBalance;

    /**
     * 变动后可用余额
     */
    private BigDecimal afterAvailableBalance;

    /**
     * 变动前冻结余额
     */
    private BigDecimal beforeFrozenBalance;

    /**
     * 变动后冻结余额
     */
    private BigDecimal afterFrozenBalance;

    /**
     * 业务类型：RECHARGE-充值 MEAL_ORDER-团餐订单 REFUND-退款 ADJUST-调整
     */
    private String bizType;

    /**
     * 业务ID
     */
    private String bizId;

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

    /**
     * 操作来源：SYSTEM-系统 ADMIN-后台 MINI-小程序 PAY_NOTIFY-支付回调
     */
    private String operateSource;

    /**
     * 操作人ID
     */
    private String operatorId;

    /**
     * 操作人姓名
     */
    private String operatorName;
}
