package com.arrebol.taxiservicios.model.admin;

import com.arrebol.taxiservicios.model.core.Person;
import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.DocumentType;
import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author Picasso
 */
public class Document implements Serializable {

    private static final long serialVersionUID = -6822768573115681044L;

    private String id;
    private String path;
    private DocumentType documentType;
    private String fileName;
    private byte[] content;
    private Person person;
    private User createdBy;
    private Date createdOn;
    private User lastUpdatedBy;
    private Date lastUpdatedOn;

    public Document() {
    }

    public Document(DocumentType documentType) {
        this.documentType = documentType;
    }

    /**
     *
     * @param id
     * @param path
     * @param documentType
     * @param fileName
     * @param content
     */
    public Document(String id, String path, DocumentType documentType, String fileName, byte[] content) {
        this.id = id;
        this.path = path;
        this.documentType = documentType;
        this.fileName = fileName;
        this.content = content;
    }

    /**
     *
     * @param id
     * @param path
     * @param documentType
     * @param fileName
     * @param content
     * @param person
     * @param createdBy
     */
    public Document(String id, String path, DocumentType documentType, String fileName, byte[] content, Person person, User createdBy) {
        this.id = id;
        this.path = path;
        this.documentType = documentType;
        this.fileName = fileName;
        this.content = content;
        this.person = person;
        this.createdBy = createdBy;
    }

    /**
     * Using in add page
     *
     * @param id
     * @param documentType
     * @param fileName
     * @param content
     * @param person
     * @param createdBy
     */
    public Document(String id, DocumentType documentType, String fileName, byte[] content, Person person, User createdBy) {
        this.id = id;
        this.documentType = documentType;
        this.fileName = fileName;
        this.content = content;
        this.person = person;
        this.createdBy = createdBy;
    }

    public String getId() {
        return id;
    }

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

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public DocumentType getDocumentType() {
        return documentType;
    }

    public void setDocumentType(DocumentType documentType) {
        this.documentType = documentType;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        this.content = content;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

    public User getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(User createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }

    public User getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(User lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Date getLastUpdatedOn() {
        return lastUpdatedOn;
    }

    public void setLastUpdatedOn(Date lastUpdatedOn) {
        this.lastUpdatedOn = lastUpdatedOn;
    }

    @Override
    public String toString() {
        return "Document{" + "id=" + id + ", path=" + path + ", documentType=" + documentType + '}';
    }

}
