aviation-model
Version:
Public methods for querying the information from aviation-pg
108 lines (87 loc) • 2.64 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: modules/airport.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: modules/airport.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>"use strict";
/**
* Define module airport
*/
module.exports = function(sequelize, DataTypes){
return sequelize.define("airport", {
airport_id: {
type: DataTypes.STRING,
primaryKey: true
},
latitude: {
type: DataTypes.TEXT
},
longitude: {
type: DataTypes.TEXT
},
name: {
type: DataTypes.TEXT
},
nickname: {
type: DataTypes.TEXT
},
iata: {
type: DataTypes.TEXT
},
icao: {
type: DataTypes.TEXT
}
}, {
/**
* Getter methods for Airports Module.
* @property {method} getName Returns the name of the airport.
* @property {method} getLocation Returns the latitude and the longitude
* @property {method} getLatitude Returns the latitude.
* @property {method} getLongitude Returns the longitude.
*/
getterMethods: {
getName: function () {
return this.name;
},
getLocation: function() {
return this.latitude + " " + this.longitude;
},
getLatitude: function() {
return this.latitude;
},
getLongitude: function(){
return this.longitude;
}
},
tableName: "airports",
timestamps: false
});
};
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Airport">Airport</a></li><li><a href="global.html#getAirportByIcao">getAirportByIcao</a></li><li><a href="global.html#getAirportData">getAirportData</a></li><li><a href="global.html#getterMethods">getterMethods</a></li><li><a href="global.html#sequelize">sequelize</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Apr 27 2016 17:06:28 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>