Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 1x 1x 1x 1x 1x 1x 1x 1x 1x | import {belongsTo, model} from '@loopback/repository';
import {BaseEntity} from '.';
import {FlowAction} from './flow-action.model';
import {FlowJourneyPoint} from './flow-journey-point.model';
import {Flow} from './flow.model';
@model({
settings: {
postgresql: {table: 'flows_reference'},
foreignKeys: {
fk_flows_reference_flows_journey_point_id: {
name: 'fk_flows_reference_flows_journey_point_id',
entity: 'FlowJourneyPoint',
entityKey: 'id',
foreignKey: 'flow_journey_point_id',
onDelete: 'CASCADE',
onUpdate: 'RESTRICT'
},
},
},
})
export class FlowReference extends BaseEntity {
@belongsTo(() => Flow, {name: 'flow'})
flow_id: number;
@belongsTo(() => FlowJourneyPoint, {
name: 'flow_journey_point',
})
flow_journey_point_id: number;
@belongsTo(() => FlowAction, {
name: 'flow_action',
})
flow_action_id: number;
constructor(data?: Partial<FlowReference>) {
super(data);
}
}
export interface FlowReferenceRelations {
// describe navigational properties here
}
export type FlowReferenceWithRelations = FlowReference & FlowReferenceRelations;
|