Last updated 2 months ago
Column is a decorator that adds a column to the database table. You can define a column by adding the @Column decorator to a class property within a schema.
@Column
/* ./schemas/photo.ts */ import { Schema, Column, Unique, Default } from 'nexorm/decorators'; @Schema class PhotoSchema { @Column @Unique static photoId = String; @Column static photo = Buffer; @Column @Default(new Date()) static date = Date; };
to see other decorators available with @Column