Dear i appreciate for your great work, i want to use generated models in NestJS application with Postgres and Sequelize
i am getting Error: @table annotation is missing on class "Student". can you please provide option for decorator based models like below.
import {
Table,
Column,
Model,
DataType,
CreatedAt,
UpdatedAt,
BelongsToMany,
PrimaryKey,
AutoIncrement,
AllowNull,
} from 'sequelize-typescript';
import { CourseSection } from './CourseSection';
import { Column, Model, Table } from 'sequelize-typescript';
@table
export class User extends Model {
@column
firstName: string;
@column
lastName: string;
@column({ defaultValue: true })
isActive: boolean;
}
Dear i appreciate for your great work, i want to use generated models in NestJS application with Postgres and Sequelize
i am getting Error: @table annotation is missing on class "Student". can you please provide option for decorator based models like below.
import {
Table,
Column,
Model,
DataType,
CreatedAt,
UpdatedAt,
BelongsToMany,
PrimaryKey,
AutoIncrement,
AllowNull,
} from 'sequelize-typescript';
import { CourseSection } from './CourseSection';
import { Column, Model, Table } from 'sequelize-typescript';
@table
export class User extends Model {
@column
firstName: string;
@column
lastName: string;
@column({ defaultValue: true })
isActive: boolean;
}