Indicates if this column is an array.
Can be simply set to true or array length can be specified.
Supported only by postgres.
可选asExpression
asExpression?:string
Generated column expression.
可选charset
charset?:string
Defines a column character set.
Not supported by all database types.
可选collation
collation?:string
Defines a column collation.
可选columnDefinition
columnDefinition?:string
Extra column definition. Should be used only in emergency situations. Note that if you'll use this property
auto schema generation will not work properly anymore. Avoid using it.
可选comment
comment?:string
Column comment.
可选createDate
createDate?:boolean
Indicates if this column is a created date column.
可选default
default?:any
Default database value.
可选deleteDate
deleteDate?:boolean
Indicates if this column is a delete date column.
可选enum
enum?:Object|any[]
Array of possible enumerated values.
可选enumName
enumName?:string
Exact name of enum
可选generated
generated?:true|"uuid"|"rowid"|"increment"
Specifies if this column will use AUTO_INCREMENT or not (e.g. generated number).
可选generatedType
generatedType?:"VIRTUAL"|"STORED"
Generated column type.
可选hstoreType
hstoreType?:"string"|"object"
Return type of HSTORE column.
Returns value as string or as object.
可选insert
insert?:boolean
Indicates if column is inserted by default.
Default value is "true".
可选length
length?:string|number
Column type's length. For example type = "string" and length = 100 means that ORM will create a column with
type varchar(100).
可选name
name?:string
Column name in the database.
可选nullable
nullable?:boolean
Indicates if column's value can be set to NULL.
可选objectId
objectId?:boolean
Indicates if this column is of type ObjectId
可选onUpdate
onUpdate?:string
ON UPDATE trigger. Works only for MySQL.
可选precision
precision?:number
The precision for a decimal (exact numeric) column (applies only for decimal column), which is the maximum
number of digits that are stored for the values.
可选primary
primary?:boolean
Indicates if this column is a primary column.
可选primaryKeyConstraintName
primaryKeyConstraintName?:string
Name of the primary key constraint.
可选readonly
readonly?:boolean
Indicates if column value is not updated by "save" operation.
It means you'll be able to write this value only when you first time insert the object.
Default value is "false".
已被弃用
Please use the update option instead. Careful, it takes
the opposite value to readonly.
可选scale
scale?:number
The scale for a decimal (exact numeric) column (applies only for decimal column), which represents the number
of digits to the right of the decimal point and must not be greater than precision.
可选select
select?:boolean
Indicates if column is always selected by QueryBuilder and find operations.
Default value is "true".
Column type. Must be one of the value from the ColumnTypes class.
可选unique
unique?:boolean
Specifies if column's value must be unique or not.
可选unsigned
unsigned?:boolean
Puts UNSIGNED attribute on to numeric column. Works only for MySQL.
可选update
update?:boolean
Indicates if column value is updated by "save" operation.
If false you'll be able to write this value only when you first time insert the object.
Default value is "true".
可选updateDate
updateDate?:boolean
Indicates if this column is an update date column.
可选version
version?:boolean
Indicates if this column is a version column.
可选width
width?:number
Column type's display width. Used only on some column types in MySQL.
For example, INT(4) specifies an INT with a display width of four digits.
可选zerofill
zerofill?:boolean
Puts ZEROFILL attribute on to numeric column. Works only for MySQL.
If you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column
Indicates if this column is an array. Can be simply set to true or array length can be specified. Supported only by postgres.