Members
Object
# inner constant campus
Example
{
campus_id: {
type: DataTypes.INTEGER,
primaryKey: boolean,
allowNull: boolean,
autoIncrement: boolean,
validate: { isInteger: boolean }
},
name: {
type: DataTypes.STRING,
allowNull: boolean,
unique: boolean,
validate: { notEmpty: boolean }
},
address_street: {
type: DataTypes.STRING,
allowNull: boolean,
},
address_city: {
type: DataTypes.STRING,
allowNull: boolean,
},
address_postal_code: {
type: DataTypes.STRING,
allowNull: boolean,
},
geo_position: {
type: DataTypes.GEOMETRY("POINT"),
allowNull: boolean,
}
}
Methods
# static define(sequelize, name)
Define the model
Parameters:
| Name | Type | Description |
|---|---|---|
sequelize |
Sequelize
|
|
name |
string
|
The file name used for the definition |