不要怂,就是干,撸起袖子干!

Commit 54b685ea by Mick Hansen

docs(model/attributes): add docs for attribute.field

1 parent 54a194a0
Showing with 3 additions and 1 deletions
...@@ -285,6 +285,7 @@ module.exports = (function() { ...@@ -285,6 +285,7 @@ module.exports = (function() {
* msg: "Must be English or Chinese" * msg: "Must be English or Chinese"
* } * }
* }, * },
* field: 'column_a'
* // Other attributes here * // Other attributes here
* }, * },
* columnB: Sequelize.STRING, * columnB: Sequelize.STRING,
...@@ -312,9 +313,10 @@ module.exports = (function() { ...@@ -312,9 +313,10 @@ module.exports = (function() {
* @param {Any} [attributes.column.defaultValue=null] A literal default value, a javascript function, or an SQL function (see `sequelize.fn`) * @param {Any} [attributes.column.defaultValue=null] A literal default value, a javascript function, or an SQL function (see `sequelize.fn`)
* @param {String|Boolean} [attributes.column.unique=false] If true, the column will get a unique constraint. If a string is provided, the column will be part of a composite unique index. If multiple columns have the same string, they will be part of the same unique index * @param {String|Boolean} [attributes.column.unique=false] If true, the column will get a unique constraint. If a string is provided, the column will be part of a composite unique index. If multiple columns have the same string, they will be part of the same unique index
* @param {Boolean} [attributes.column.primaryKey=false] * @param {Boolean} [attributes.column.primaryKey=false]
* @param {String} [attributes.column.field=null] If set, sequelize will map the attribute name to a different name in the database
* @param {Boolean} [attributes.column.autoIncrement=false] * @param {Boolean} [attributes.column.autoIncrement=false]
* @param {String} [attributes.column.comment=null] * @param {String} [attributes.column.comment=null]
* @param {String|Model} [attributes.column.references] If this column references another table, provide it here as a Model, or a string * @param {String|Model} [attributes.column.references] If this column references another table, provide it here as a Model, or a string
* @param {String} [attributes.column.referencesKey='id'] The column of the foreign table that this column references * @param {String} [attributes.column.referencesKey='id'] The column of the foreign table that this column references
* @param {String} [attributes.column.onUpdate] What should happen when the referenced key is updated. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or NO ACTION * @param {String} [attributes.column.onUpdate] What should happen when the referenced key is updated. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or NO ACTION
* @param {String} [attributes.column.onDelete] What should happen when the referenced key is deleted. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or NO ACTION * @param {String} [attributes.column.onDelete] What should happen when the referenced key is deleted. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or NO ACTION
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!