/*
 * 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.customer;

import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import model.person.Person;
import model.company.Company;
import model.company.Location;

/**
 *
 * @author patri
 */
@Entity
public class Customer extends Person{
    
    @ManyToOne
    private Company company;
    
    @ManyToMany
    private Set<Location> locations;
    
    @Column(nullable = true, length = 210)
    private String note;

    public Customer() {
    }

    public Customer(Company company) {
        this.company = company;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    public Set<Location> getLocations() {
        return locations;
    }

    public void setLocations(Set<Location> locations) {
        this.locations = locations;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }
}
