mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
NoteEntity: Formatting fixes
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
85fa30b27c
commit
bb9e60d5f6
1 changed files with 0 additions and 8 deletions
|
@ -16,51 +16,43 @@ import { AuthorColor } from './author-color.entity';
|
|||
export class Note {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
})
|
||||
shortid: string;
|
||||
|
||||
@Column({
|
||||
unique: true,
|
||||
nullable: true,
|
||||
})
|
||||
alias: string;
|
||||
|
||||
@OneToMany(
|
||||
_ => NoteGroupPermission,
|
||||
groupPermission => groupPermission.note,
|
||||
)
|
||||
groupPermissions: NoteGroupPermission[];
|
||||
|
||||
@OneToMany(
|
||||
_ => NoteUserPermission,
|
||||
userPermission => userPermission.note,
|
||||
)
|
||||
userPermissions: NoteUserPermission[];
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
default: 0,
|
||||
})
|
||||
viewcount: number;
|
||||
|
||||
@ManyToOne(
|
||||
_ => User,
|
||||
user => user.ownedNotes,
|
||||
{ onDelete: 'CASCADE' },
|
||||
)
|
||||
owner: User;
|
||||
|
||||
@OneToMany(
|
||||
_ => Revision,
|
||||
revision => revision.note,
|
||||
{ cascade: true },
|
||||
)
|
||||
revisions: Revision[];
|
||||
|
||||
@OneToMany(
|
||||
_ => AuthorColor,
|
||||
authorColor => authorColor.note,
|
||||
|
|
Loading…
Reference in a new issue