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.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author lsw
 * @date 2024-04-18
 */
@Data
@TableName(value = "tb_money_out")
@Accessors(chain = true)
public class MoneyOut{
    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = "关联企业")
    private Long companyId;

    @ApiModelProperty(value = "申请提现人id")
    private Long userId;

    @ApiModelProperty(value = "提现编号")
    private String nums;

    @NotNull(message = "提现金额不能为空")
    @DecimalMin(value = "1", inclusive = false, message = "提现金额不能小于1")
    @ApiModelProperty(value = "提现金额")
    private BigDecimal money;

    @ApiModelProperty(value = "状态:0=正常,1=停用")
    private Integer state;

    @ApiModelProperty(value = "充值无效原因")
    private String msg;

    private String version;

    @ApiModelProperty(value = "创建者")
    private String opBy;

    @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 = "企业名称")
    @TableField(exist = false)
    private String companyName;

    //开始日期
    @TableField(exist = false)
    private String dateBegin;

    //结束日期
    @TableField(exist = false)
    private String dateEnd;

    @TableField(exist = false)
    private Company company;
}
