postgrelize / PrimaryKey
Variable: PrimaryKey ​
constPrimaryKey:ModelPropertyDecorator
Defined in: src/decorators/column-decorators.ts:46
Makes the attribute part of the primary key (primaryKey: true).
Example ​
ts
class User extends Model {
@PrimaryKey
@Column(DataTypes.INTEGER)
id!: number;
}