package com.wzj.soopin.order.domain.entity;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import org.dromara.common.core.domain.model.BaseAudit;

@Data
@Schema(description = "红包实体")
@TableName("oms_red_packet")
public class RedPacket extends BaseAudit {
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "红包id")
    private Long id;

    @TableField("sender_id")
    @Schema(description = "发送人id")
    private Long senderId;

    @TableField("chat_type")
    @Schema(description = "聊天类型(1:单聊 2:群聊)")
    private Integer chatType;

    @TableField("receiver_id")
    @Schema(description = "接收者ID(单聊)")
    private Long receiverId;

    @TableField("group_id")
    @Schema(description = "群id")
    private Long groupId;

    @TableField("packet_type")
    @Schema(description = "红包类型(1:普通)")
    private Integer packetType;

    @TableField("total_amount")
    @Schema(description = "总金额")
    private BigDecimal totalAmount;

    @TableField("total_count")
    @Schema(description = "总个数")
    private Integer totalCount;

    @TableField("remaining_amount")
    @Schema(description = "剩余金额")
    private BigDecimal remainingAmount;

    @TableField("remaining_count")
    @Schema(description = "剩余个数")
    private Integer remainingCount;

    @TableField("status")
    @Schema(description = "状态(0:未领取 1:已领取部分 2:已领完 3:已过期 4:已退款)")
    private Integer status;

    @TableField("expire_time")
    @Schema(description = "过期时间")
    private LocalDateTime expireTime;

    @TableField("remark")
    @Schema(description = "备注")
    private String remark;
}
