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.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

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

/**
 * @author lsw
 * @date 2024-04-19
 */
@Data
@TableName(value = "tb_packages")
@Accessors(chain = true)
public class Packages {
    private static final long serialVersionUID = 1L;

    private Long id;

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

    @NotNull(message = "参数错误")
    @ApiModelProperty(value = "关联项目")
    private Long projectId;

    @TableField(exist = false)
    private String projectName;

    @NotNull(message = "参数错误")
    @ApiModelProperty(value = "关联企业")
    private Long companyId;

    @ApiModelProperty(value = "接包凭证")
    private String voucher;

    @ApiModelProperty(value = "凭证审核")
    private Integer audit;

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

    @ApiModelProperty(value = "状态:0=已接包,1=已完成")
    private Integer state;

    @TableField(fill = FieldFill.INSERT)
    private String createBy;

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

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

    @TableField(exist = false)
    @ApiModelProperty(value = "姓名")
    @Excel(name = "姓名")
    private String name;

    @TableField(exist = false)
    @ApiModelProperty(value = "身份证")
    @Excel(name = "身份证号",width =35)
    private String idCard;

    @TableField(exist = false)
    @ApiModelProperty(value = "手机号")
    @Excel(name = "手机号")
    private String phone;

    @TableField(exist = false)
    @ApiModelProperty(value = "支付宝")
    @Excel(name = "支付宝")
    private String alipay;

    @TableField(exist = false)
    @ApiModelProperty(value = "开户行")
    @Excel(name = "开户行")
    private String bankName;

    @TableField(exist = false)
    @ApiModelProperty(value = "银行卡账号")
    @Excel(name = "银行卡号",width =30)
    private String bankAccount;

    @TableField(exist = false)
    @Excel(name = "金额（元）")
    private BigDecimal money;

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