Function: Column()
Column(
options?):PropertyDecorator
Defined in: src/decorators/Column.ts:27
Property decorator mapping a class property to a database table column.
Configures database column names, data types, nullability, character limits, precision, and defaults.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | ColumnOptions | Column mapping options. |
Returns
PropertyDecorator
Usecase
Map TypeScript entity fields to database columns with specific constraints and data types.
Example
@Column({ name: 'email_address', maxLength: 255, nullable: false })
email!: string;