package org.jeecg.modules.stm.rate.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
 
 
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 附件
 * @Author: jeecg-boot
 * @Date:   2023-09-26
 * @Version: V1.0
 */
@Data
@TableName("rate_file")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
 
public class RateFile implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    
    private java.lang.String id;
	/**创建人*/
    
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    
    private java.util.Date createTime;
	/**更新人*/
    
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    
    private java.util.Date updateTime;
	/**所属部门*/
    
    private java.lang.String sysOrgCode;
	/**要素id*/
	@Excel(name = "要素id", width = 15)
    
    private java.lang.String keyitemId;
	/**序号*/
	@Excel(name = "序号", width = 15)
    
    private java.lang.Integer valIndex;
	/**填报人*/
	@Excel(name = "填报人", width = 15)
    
    private java.lang.String inputuser;
	/**任务id*/
	@Excel(name = "任务id", width = 15)
    
    private java.lang.String taskId;
	/**备注*/
	@Excel(name = "备注", width = 15)
    
    private java.lang.String remark;
	/**附件*/
	@Excel(name = "附件", width = 15)
    private transient java.lang.String fileString;

    private byte[] file;

    public byte[] getFile(){
        if(fileString==null){
            return null;
        }
        try {
            return fileString.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getFileString(){
        if(file==null || file.length==0){
            return "";
        }
        try {
            return new String(file,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
	/**附件名*/
	@Excel(name = "附件名", width = 15)
    
    private java.lang.String filenamestr;
	/**附件类型*/
	@Excel(name = "附件类型", width = 15)
    
    private java.lang.String filenamesufstr;
}
