My current challenge involves:
interface PersonI {
id?: number | null,
firstName: string,
lastName: string
}
@Table(
{
tableName: 'person',
timestamps: true
}
)
class Person extends Model implements PersonI{
@AutoIncrement
@PrimaryKey
@Column(INTEGER)
id!: number
@AllowNull(false)
@NotEmpty
@Column(STRING)
firstName!: string
@AllowNull(false)
@NotEmpty
@Column(STRING)
lastName!: string
}
Despite my efforts, I keep encountering this error message: TypeError: Class constructor Model cannot be invoked without 'new'; What could be causing this issue?