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-16
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mk_consume_discount")
public class MkConsumeDiscount implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    /**
     * 是否开启
     */
    private Integer isEnable;

    /**
     * 固定 FIXED 随机 RANDOM
     */
    private String discountType;

    /**
     * 固定减免金额
     */
    private BigDecimal discountAmount;

    /**
     * 随机减免规则
     */
    private String randomDiscountList;

    /**
     * 用餐模式 堂食 dine-in  外带 take-out 外卖 take-away
     */
    private String useTypeList;

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

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

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;


    private LocalDateTime startTime;
    private LocalDateTime endTime;

}
