mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
676 B
40 lines
676 B
/**
|
|
* Locale schema
|
|
*/
|
|
module.exports = (sequelize, DataTypes) => {
|
|
let localeSchema = sequelize.define('locale', {
|
|
code: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false
|
|
},
|
|
strings: {
|
|
type: DataTypes.JSON,
|
|
allowNull: true
|
|
},
|
|
isRTL: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: false
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false
|
|
},
|
|
nativeName: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false
|
|
}
|
|
}, {
|
|
timestamps: true,
|
|
version: true,
|
|
indexes: [
|
|
{
|
|
unique: true,
|
|
fields: ['code']
|
|
}
|
|
]
|
|
})
|
|
|
|
return localeSchema
|
|
}
|