Merged PetitTetonApps with the website now that the deployment server always uses SSL. Used the Apps more recent implementation of NodeJS/Express.
This commit is contained in:
32
app/models/measure.js
Normal file
32
app/models/measure.js
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(sequelize, DataTypes) {
|
||||
//The id field is auto added and made primary key.
|
||||
return sequelize.define('Measure', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
allowNull: false,
|
||||
autoIncrement: true
|
||||
},
|
||||
name: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
image: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true
|
||||
},
|
||||
postfix: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
visible: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true
|
||||
}
|
||||
}, {
|
||||
freezeTableName: true // Model tableName will be the same as the model name
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user