hedgedoc/src/permissions/note-group-permission.entity.ts

20 lines
399 B
TypeScript
Raw Normal View History

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;
}