import Employee from "./Employee";

export default class Company {
    constructor(data) {
        this.id = data?.id;      
        this.name = data?.name || '';
        this.employees = data?.employees.map((e) => new Employee(e)) || '';       
        this.countEmployees = '';
        if (this.employees !== '') {
            this.countEmployees = this.employees.length;
        }
    }
}