hedgedoc/src/permissions/note-group-permission.entity.ts
David Mehren f81e67a3a1
Format with Prettier 2
Signed-off-by: David Mehren <git@herrmehren.de>
2021-01-06 23:49:45 +01:00

21 lines
516 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
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;
}