eyght-models
Version:
Models for eyght
18 lines (15 loc) • 592 B
JavaScript
let mongoose = require('mongoose');
mongoose.Promise = global.Promise;
let genLangSchema = new mongoose.Schema({
iso639_2b: {type: 'String'},
iso639_2t: {type: 'String'},
iso639_1: {type: 'String'},
langName: {type: 'String'},
langFam: {type: 'String'},
nativeName: {type: 'String'},
langNotes: {type: 'String'},
active: {type: 'Number', required: true},
inactDt: {type: 'Date'}, //store all dates in utc
inactRsnID: {type: mongoose.Schema.Types.ObjectId, ref: 'genInactRsn'}
}, {timestamps: true});
module.exports = mongoose.model('genLang', genLangSchema, 'genLang');