/*
 * Copyright 2018 Scytl Secure Electronic Voting SA
 *
 * All rights reserved
 *
 * See our extended copyright notice in *file 'Copyright.txt' which is part of this source code package
 */
package com.scytl.products.ov.channel.cc.orchestrator.mixdec.domain.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.scytl.products.ov.commons.domain.model.Constants;

@Entity
@Table(name = "MIXDEC_BALLOT_BOX")
public class MixDecBallotBox {

    /** The id of a ballot box. */
    @Id
    @Column(name = "ID", nullable = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "mixDecBallotBoxSeq")
    @SequenceGenerator(name = "mixDecBallotBoxSeq", sequenceName = "MIXDEC_BALLOT_BOX_SEQ")
    @JsonIgnore
    private Integer id;

    /** The tenant id. */
    @Column(name = "TENANT_ID")
    @NotNull
    @Size(max = Constants.COLUMN_LENGTH_100)
    private String tenantId;

    /** The voting card id. */
    @Column(name = "ELECTION_EVENT_ID")
    @NotNull
    @Size(max = Constants.COLUMN_LENGTH_100)
    private String electionEventId;

    /** The ballot box id. */
    @Column(name = "BALLOT_BOX_ID")
    @NotNull
    @Size(max = Constants.COLUMN_LENGTH_100)
    private String ballotBoxId;

    /** The string of a vote. */
    @Column(name = "VOTE")
    @NotNull
    @Lob
    private String vote;

    /**
     * Returns the current value of the field id.
     *
     * @return Returns the id.
     */
    public Integer getId() {
        return id;
    }

    /**
     * Sets the value of the field id.
     *
     * @param id
     *            The id to set.
     */
    public void setId(final Integer id) {
        this.id = id;
    }

    /**
     * Returns the current value of the field tenantId.
     *
     * @return Returns the tenantId.
     */
    public String getTenantId() {
        return tenantId;
    }

    /**
     * Sets the value of the field tenantId.
     *
     * @param tenantId
     *            The tenantId to set.
     */
    public void setTenantId(final String tenantId) {
        this.tenantId = tenantId;
    }

    /**
     * Returns the current value of the field vote.
     *
     * @return Returns the vote.
     */
    public String getVote() {
        return vote;
    }

    /**
     * Sets the value of the field vote.
     *
     * @param vote
     *            The vote to set.
     */
    public void setVote(final String vote) {
        this.vote = vote;
    }

    /**
     * Returns the current value of the field ballotBoxId.
     *
     * @return Returns the ballotBoxId.
     */
    public String getBallotBoxId() {
        return ballotBoxId;
    }

    /**
     * Sets the value of the field ballotBoxId.
     *
     * @param ballotBoxId
     *            The ballotBoxId to set.
     */
    public void setBallotBoxId(final String ballotBoxId) {
        this.ballotBoxId = ballotBoxId;
    }

    /**
     * Returns the current value of the field electionEventId.
     *
     * @return Returns the electionEventId.
     */
    public String getElectionEventId() {
        return electionEventId;
    }

    /**
     * Sets the value of the field electionEventId.
     *
     * @param electionEventId
     *            The electionEventId to set.
     */
    public void setElectionEventId(final String electionEventId) {
        this.electionEventId = electionEventId;
    }

}


