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 com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.web.work.domain.base.BaseData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author lsw
 * @date 2024-04-20
 */
@Data
@TableName(value = "tb_statement")
@Accessors(chain = true)
public class Statement extends BaseData {
    private static final long serialVersionUID = 1L;

    private Long id;

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

    @ApiModelProperty(value = "关联用户")
    private Long userId;

    @ApiModelProperty(value = "上传文档名称")
    private String fileName;

    @NotBlank(message = "结算批次不能为空")
    @ApiModelProperty(value = "结算批次")
    private String batchName;

    @NotBlank(message = "发票类型不能为空")
    @ApiModelProperty(value = "发票类型")
    private String invoice;

    @NotBlank(message = "支付渠道不能为空")
    @ApiModelProperty(value = "支付渠道")
    private String channel;

    @ApiModelProperty(value = "结算单号")
    private String num;

    @ApiModelProperty(value = "发放金额")
    private BigDecimal money;

    @ApiModelProperty(value = "发放业务费")
    private BigDecimal realMoney;

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

    @ApiModelProperty(value = "发放人数")
    private Integer peoples;

    @NotNull(message = "关联项目不能为空")
    @ApiModelProperty(value = "关联项目")
    private Long projectId;

    @ApiModelProperty(value = "服务公司")
    private String serviceCompany;

    @ApiModelProperty(value = "制单状态:0=待生成,1=已生成")
    private Integer state;

    @ApiModelProperty(value = "是否审核:0=待提交,1=待审核,2=审核通过,3=驳回")
    private Integer audit;

    @ApiModelProperty(value = "审核驳回原因")
    private String msg;

    @ApiModelProperty(value = "发放状态:0=待发放,1=已发放")
    private Integer give;

    @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;

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

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "提审时间")
    private Date submitTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审核时间")
    private Date auditTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "发放时间")
    private Date giveTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @TableField(exist = false)
    @ApiModelProperty(value = "企业名称")
    private String companyName;

    @NotNull(message = "请上传结算单")
    @TableField(exist = false)
    @JsonIgnore
    private MultipartFile file;

}
