import { FlightModel } from '.';
import { ListItem } from './flight.model';

export class ScheduleItemModel {
    date: Date;
    get month() {
        return this.date.getMonth();
    }
    get year() {
        return this.date.getFullYear();
    }
    get dayOfWeek() {
        return this.date.getDay();
    }
    get day() {
        return this.date.getDate();
    }

    expanded = false;
    flights: ListItem<FlightModel>[] = [];
    constructor(patch: Partial<ScheduleItemModel>) {
        Object.assign(this, patch);
    }
}
