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;

/**
 * 新客立减减免记录 实体类。
 *
 * @author zs
 * @since 2025-09-17
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mk_shop_consume_discount_record")
public class MkShopConsumeDiscountRecord implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    /**
     * 消费立减id
     */
    private Long consumeDiscountId;
    private Long orderId;
    private Long shopUserId;

    /**
     * 减免金额
     */
    private BigDecimal amount;

    /**
     * 订单金额
     */
    private BigDecimal orderAmount;

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

    /**
     * 门店id
     */
    private Long shopId;
    private Integer isUse;

}
