/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model.ticket;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import model.AbstractEntity;
import model.company.Location;
import java.util.List;
import javax.persistence.OneToMany;

/**
 *
 * @author patri
 */
@Entity
public class TicketLocation extends AbstractEntity{
    @ManyToOne
    private Ticket ticket;
    
    @OneToOne
    private Location location;

    @OneToMany(mappedBy = "ticketLocation")
    private List<LocationMachine> machines;
    
    
    public TicketLocation() {
    }

    public Ticket getTicket() {
        return ticket;
    }

    public void setTicket(Ticket ticket) {
        this.ticket = ticket;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public List<LocationMachine> getMachines() {
        return machines;
    }

    public void setMachines(List<LocationMachine> machines) {
        this.machines = machines;
    }
}
