package com.ruoyi.web.work.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.web.work.domain.base.BaseData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

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

/**
 * @author lsw
 * @date 2024-07-01
 */
@Data
@TableName(value = "tb_pay")
@Accessors(chain = true)
public class Pay extends BaseData {
    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = "充值人id")
    private Long userId;

    @ApiModelProperty(value = "兼职id")
    private Long positionId;

    @ApiModelProperty(value = "充值编号")
    private String nums;

    @ApiModelProperty(value = "充值金额")
    private BigDecimal money;

    @ApiModelProperty(value = "状态:0=待支付,1=支付成功")
    private Integer state;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "类型:0=充值,1=支出,2=提现,3=收入,4=退库")
    private Integer type;

    @ApiModelProperty(value = "提现方式:0=提现到银行卡,1=提现到微信")
    private Integer way;

    @ApiModelProperty(value = "原因")
    private String msg;

    @ApiModelProperty(value = "乐观锁")
    @Version
    private Long version;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "服务费")
    private BigDecimal serviceMoney;

    @ApiModelProperty(value = "费率")
    private BigDecimal rate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "完成时间")
    private Date completeTime;
}
