import { Entity, model, property, belongsTo } from '@loopback/repository'; import { UserGroup, UserGroupWithRelations } from '../../data'; @model({settings: {strict: false}}) export class UserGroupEndPointPermission extends Entity { @property({ type: 'number', id: true, required: true, }) id: number; @property({ type: 'string', required: true, index: true, }) endpointId: string; @belongsTo(() => UserGroup, { "keyTo": "id" }) groupId: number; @property({ type: 'number', required: true, }) permission: number; [prop: string]: any; constructor(data?: Partial) { super(data); } } export interface UserGroupEndPointPermissionRelations { group?: UserGroupWithRelations; } export type UserGroupEndPointPermissionWithRelations = UserGroupEndPointPermission & UserGroupEndPointPermissionRelations;