Skip to content
Commits on Source (4)
{
"name": "laboite-blog-backend",
"version": "1.4.0",
"version": "1.5.0-testing.1",
"license": "EUPL-1.2",
"description": " API backend for laboite blog service",
"author": "EOLE/PCLL <team@eole.education> - DINUM",
......
import {model, property, Entity, belongsTo} from '@loopback/repository';
import {Group} from './group.model';
import {Entity, model, property} from '@loopback/repository';
@model()
export class GroupItem extends Entity {
......@@ -13,6 +12,11 @@ export class GroupItem extends Entity {
})
name: string;
@property({
type: 'number',
})
type: number;
constructor(data?: Partial<GroupItem>) {
super(data);
}
......
import { Entity, model, property } from '@loopback/repository';
import {Entity, model, property} from '@loopback/repository';
@model({
settings: {
strict: true,
idInjection: false,
mongodb: { collection: 'groups' }, // custom names
mongodb: {collection: 'groups'}, // custom names
},
})
export class Group extends Entity {
......@@ -37,6 +37,10 @@ export class Group extends Entity {
})
slug: string;
@property({
type: 'number',
})
type: number;
constructor(data?: Partial<Group>) {
super(data);
......