hedgedoc/src/permissions/note-group-permission.entity.ts
David Mehren 67e60a3c37
Update Note entity
We now use the new permissions split in users and groups. Also the note now knows the colors of its authors.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-20 19:43:12 +02:00

19 lines
399 B
TypeScript

import { Column, Entity, ManyToOne } from 'typeorm/index';
import { Group } from '../groups/group.entity';
import { Note } from '../notes/note.entity';
@Entity()
export class NoteGroupPermission {
@ManyToOne(_ => Group, { primary: true })
group: Group;
@ManyToOne(
_ => Note,
note => note.groupPermissions,
{ primary: true },
)
note: Note;
@Column()
canEdit: boolean;
}