package com.sqx.modules.discSpinning.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * 大转盘抽奖记录(DiscSpinningRecord)表实体类
 *
 * @author ww
 * @since 2024-12-04 11:37:36
 */
@Data
@TableName("disc_spinning_record")
public class DiscSpinningRecord extends Model<DiscSpinningRecord> {
    //主键
    private Long id;

    private Long orderId;

    private Long userId;
    //描述
    private String name;
    //类型 1谢谢惠顾 2 红包 9 其它
    private Integer type;
    //金额
    private BigDecimal number;
    //流向  1 提现 2 存入余额
    private String target;

    private Long targetId;
    //抽奖日期
    private String drawDay;
    //创建时间
    private String createTime;
    //来源 task 任务  order 订单
    private String source = "order";

    public DiscSpinningRecord() {
    }

    public DiscSpinningRecord(String name, Long orderId, Long userId, Integer type, BigDecimal number,
                              String drawDay, String createTime, String source) {
        this.name = name;
        this.userId = userId;
        this.orderId = orderId;
        this.type = type;
        this.number = number;
        this.drawDay = drawDay;
        this.createTime = createTime;
        if (StringUtils.isNotBlank(source)) {
            this.source = source;
        }
    }
}

