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 ww
 * @since 2025-10-16
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("sms_shop_money_detail")
public class SmsShopMoneyDetail implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    private Long shopId;

    /**
     * 变动原因
     */
    private String reason;

    /**
     * 1+ 2-
     */
    private Integer type;

    /**
     * 消费值
     */
    private BigDecimal expense;

    /**
     * 余额
     */
    private BigDecimal balance;
    /**
     * 发送短信条数
     */
    private Long sendRows;

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

    @Column(isLogicDelete = true)
    private Integer isDel;

}
