package com.reyun.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by sunhao on 17/5/22.
 * desc:上传记录表
 */
@Entity
public class UploadHistory {

    private Long id;

    private String uploadData;
    //格式错误数据行数
    private List<Integer> uploadErrorList;
    //与数据库重复行数
    private List<Integer> uploadRepeatedList;
    //表内重复行数
    private List<List<Integer>> innerRepeatList;
    //读取数据中间存储
    private Map<String, Map<Integer, String>> keywordCreativeMap;

    private Long accountId;

    private Long campaignId;

    private Date uploadTime;

    private int rowNumber;

    private String errorType;

    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUploadData() {
        return uploadData;
    }

    public void setUploadData(String uploadData) {
        this.uploadData = uploadData;
    }

    @Transient
    public List<Integer> getUploadErrorList() {
        return uploadErrorList;
    }

    public void setUploadErrorList(List<Integer> uploadErrorList) {
        this.uploadErrorList = uploadErrorList;
    }

    @Transient
    public List<Integer> getUploadRepeatedList() {
        return uploadRepeatedList;
    }

    public void setUploadRepeatedList(List<Integer> uploadRepeatedList) {
        this.uploadRepeatedList = uploadRepeatedList;
    }

    @Transient
    public List<List<Integer>> getInnerRepeatList() {
        return innerRepeatList;
    }

    public void setInnerRepeatList(List<List<Integer>> innerRepeatList) {
        this.innerRepeatList = innerRepeatList;
    }



    @Transient
    public Map<String, Map<Integer, String>> getKeywordCreativeMap() {
        return keywordCreativeMap;
    }

    public void setKeywordCreativeMap(Map<String, Map<Integer, String>> keywordCreativeMap) {
        this.keywordCreativeMap = keywordCreativeMap;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Long getCampaignId() {
        return campaignId;
    }

    public void setCampaignId(Long campaignId) {
        this.campaignId = campaignId;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public int getRowNumber() {
        return rowNumber;
    }

    public void setRowNumber(int rowNumber) {
        this.rowNumber = rowNumber;
    }

    @Transient
    public String getErrorType() {
        return errorType;
    }

    public void setErrorType(String errorType) {
        this.errorType = errorType;
    }
}
