2021-01-05 16:12:38 -05:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2020 The HedgeDoc developers (see AUTHORS file)
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2020-08-13 14:24:45 -04:00
|
|
|
import { Column, Entity, ManyToOne } from 'typeorm/index';
|
2020-08-12 14:24:43 -04:00
|
|
|
import { Group } from '../groups/group.entity';
|
|
|
|
import { Note } from '../notes/note.entity';
|
|
|
|
|
2020-08-13 14:24:45 -04:00
|
|
|
@Entity()
|
2020-08-12 14:24:43 -04:00
|
|
|
export class NoteGroupPermission {
|
2020-08-13 14:24:45 -04:00
|
|
|
@ManyToOne(_ => Group, { primary: true })
|
2020-08-12 14:24:43 -04:00
|
|
|
group: Group;
|
|
|
|
|
2020-08-13 14:24:45 -04:00
|
|
|
@ManyToOne(
|
|
|
|
_ => Note,
|
|
|
|
note => note.groupPermissions,
|
|
|
|
{ primary: true },
|
|
|
|
)
|
2020-08-12 14:24:43 -04:00
|
|
|
note: Note;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
canEdit: boolean;
|
|
|
|
}
|