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 | 1x 1x 1x 1x 92x 1x 1x 92x 1x | import { belongsTo, model, property } from '@loopback/repository';
import { BaseEntity, User } from '.';
import { Created } from '../types';
import { Flow } from './flow.model';
@model({
settings: {
postgresql: { table: 'flows_notification' },
foreignKeys: {
fk_flows_notification_flows: {
name: 'fk_flows_notification_flows',
entity: 'Flow',
entityKey: 'id',
foreignKey: 'flow_id',
onDelete: 'CASCADE',
onUpdate: 'RESTRICT'
},
},
},
})
export class FlowNotification extends BaseEntity implements Created {
@belongsTo(() => Flow, { name: 'flow' })
flow_id: number;
@property({
type: 'date',
defaultFn: 'now',
})
created_date?: Date;
@belongsTo(() => User, { name: 'creator' })
created_by?: number;
constructor(data?: Partial<FlowNotification>) {
super(data);
}
}
export interface FlowNotificationRelations { }
export type FlowNotificationWithRelations = FlowNotification & FlowNotificationRelations;
|