Page Contents

Home > @loopback/sequelize > SequelizeCrudRepository > getSequelizeModelAttributes

SequelizeCrudRepository.getSequelizeModelAttributes() method

Get Sequelize Model Attributes

Signature:

protected getSequelizeModelAttributes(definition: {
        [name: string]: PropertyDefinition;
    }): ModelAttributes<SequelizeModel, Attributes<SequelizeModel>>;

Parameters

Parameter Type Description
definition { [name: string]: PropertyDefinition; } property definition received from loopback entityClass eg. { id: { type: "Number", id: true } }

Returns:

ModelAttributes<SequelizeModel, Attributes<SequelizeModel>>

model attributes supported in sequelize model definiotion

TODO: Verify all possible loopback types https://loopback.io/doc/en/lb4/LoopBack-types.html