package com.czg.account.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 活动 实体类。
 *
 * @author ww
 * @since 2025-02-20
 */
@Data

@NoArgsConstructor
@AllArgsConstructor
@Table("tb_shop_activate")
public class ShopActivate implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    private Long shopId;

    /**
     * 充值金额
     */
    private BigDecimal amount;

    /**
     * 赠送金额
     */
    private BigDecimal giftAmount;

    /**
     * 赠送积分
     */
    private Integer giftPoints;

    /**
     * 是否赠送优惠卷 0否 1是
     */
    private Integer isGiftCoupon;

    /**
     * 优惠卷信息{卷id：数量}
     */
    private String coupons;

    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

}
