import {ServiceBase} from "./serviceBase"; import {AirportModel} from "../models/airport.model"; export class AirportService extends ServiceBase { static async getOne(icao : string) : Promise{ const sql = `select icao, name, country, runwayLength from Airport where icao = ?1;` const params = { 1: icao } return await this.get(sql, params); } static async getAll() : Promise{ const sql = `select icao, name, country, runwayLength from Airport;` return await this.all(sql); } static async getIcaoCodes() : Promise{ const sql = `select icao from Airport;` return await this.all(sql); } }