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 Administrator
 * @since 2025-02-11
 */
@Data

@NoArgsConstructor
@AllArgsConstructor
@Table("tb_merchant_register")
public class MerchantRegister implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    /**
     * 激活码
     */
    private String registerCode;

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

    /**
     * 激活码金额
     */
    private BigDecimal amount;

    /**
     * 激活时长（月）
     */
    private Integer periodMonth;

    /**
     * 状态0未使用1已使用
     */
    private Integer status;

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

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

}
