mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 12:08:02 -05:00
NoteEntity: Formatting fixes
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
4ff60b162e
commit
8c050b3c2f
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