All files / src/models flow-default-reference.model.ts

66.67% Statements 8/12
100% Branches 0/0
0% Functions 0/4
60% Lines 6/10

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 47 48 49 50 51 521x 1x                                           1x   1x         1x         1x                                
import {belongsTo, model} from '@loopback/repository';
import {
  BaseEntity,
  FlowDefault,
  FlowDefaultAction,
  FlowDefaultJourneyPoint,
} from '.';
 
@model({
  settings: {
    postgresql: {table: 'flows_default_reference'},
    foreignKeys: {
      fk_flows_default_reference_flows_default_journey_point_id: {
        name: 'fk_flows_default_reference_flows_default_journey_point_id',
        entity: 'FlowDefaultJourneyPoint',
        entityKey: 'id',
        foreignKey: 'flow_default_journey_point_id',
        onDelete: 'CASCADE',
        onUpdate: 'RESTRICT'
      },
    },
  },
})
export class FlowDefaultReference extends BaseEntity {
  @belongsTo(() => FlowDefault, {name: 'flow_default'})
  flow_default_id: number;
 
  @belongsTo(() => FlowDefaultJourneyPoint, {
    name: 'flow_default_journey_point',
  })
  flow_default_journey_point_id: number;
 
  @belongsTo(() => FlowDefaultAction, {
    name: 'flow_default_action',
  })
  flow_default_action_id: number;
 
  id: number;
  name: string;
 
  constructor(data?: Partial<FlowDefaultReference>) {
    super(data);
  }
}
 
export interface FlowDefaultReferenceRelations {
  // describe navigational properties here
}
 
export type FlowDefaultReferenceWithRelations = FlowDefaultReference &
  FlowDefaultReferenceRelations;