package com.czg.market.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 消费返现明细 实体类。
 *
 * @author zs
 * @since 2025-10-13
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mk_consume_cashback_record")
@Accessors(chain = true)
public class MkConsumeCashbackRecord implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

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

    /**
     * 主店id
     */
    private Long mainShopId;

    /**
     * 分店id
     */
    private Long shopId;

    /**
     * 支付金额
     */
    private BigDecimal amount;

    /**
     * 返现金额
     */
    private BigDecimal cashbackAmount;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 店铺用户id
     */
    private Long shopUserId;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 订单id
     */
    private Long orderId;

}
