EntityIdStrategy
Documentation generated from entity-id-strategy.ts on Feb 19 2019 at 16:20
The EntityIdStrategy determines how entity IDs are generated and stored in the database, as well as how they are transformed when being passed from the API to the service layer.
Signature
interface EntityIdStrategy<T extends ID = ID> {
readonly primaryKeyType: PrimaryKeyType;
encodeId: (primaryKey: T) => string;
decodeId: (id: string) => T;
}
Members
primaryKeyType
property
type:
PrimaryKeyType
encodeId
property
type:
(primaryKey: T) => string
decodeId
property
type:
(id: string) => T