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 lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 会员充值订单 实体类。
 *
 * @author zs
 * @since 2025-09-11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_member_order")
public class MemberOrder implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

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

    /**
     * 金额
     */
    private BigDecimal amount;
    private BigDecimal price;

    /**
     * 名称
     */
    private String name;

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

    /**
     * 实际支付金额
     */
    private BigDecimal payAmount;

    /**
     * 成长值
     */
    private Integer reward;

    /**
     * 会员周期
     */
    private Integer circleTime;
    /**
     * 会员单位
     */
    private String circleUnit;

    /**
     * 优惠券信息
     */
    private String couponList;

    /**
     * 状态
     */
    private String status;

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

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

    /**
     * 支付时间
     */
    private LocalDateTime payTime;

    /**
     * 数量
     */
    private Integer num;

}
