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 {
|
export class Note {
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
unique: true,
|
unique: true,
|
||||||
})
|
})
|
||||||
shortid: string;
|
shortid: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
unique: true,
|
unique: true,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
alias: string;
|
alias: string;
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
_ => NoteGroupPermission,
|
_ => NoteGroupPermission,
|
||||||
groupPermission => groupPermission.note,
|
groupPermission => groupPermission.note,
|
||||||
)
|
)
|
||||||
groupPermissions: NoteGroupPermission[];
|
groupPermissions: NoteGroupPermission[];
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
_ => NoteUserPermission,
|
_ => NoteUserPermission,
|
||||||
userPermission => userPermission.note,
|
userPermission => userPermission.note,
|
||||||
)
|
)
|
||||||
userPermissions: NoteUserPermission[];
|
userPermissions: NoteUserPermission[];
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
viewcount: number;
|
viewcount: number;
|
||||||
|
|
||||||
@ManyToOne(
|
@ManyToOne(
|
||||||
_ => User,
|
_ => User,
|
||||||
user => user.ownedNotes,
|
user => user.ownedNotes,
|
||||||
{ onDelete: 'CASCADE' },
|
{ onDelete: 'CASCADE' },
|
||||||
)
|
)
|
||||||
owner: User;
|
owner: User;
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
_ => Revision,
|
_ => Revision,
|
||||||
revision => revision.note,
|
revision => revision.note,
|
||||||
{ cascade: true },
|
{ cascade: true },
|
||||||
)
|
)
|
||||||
revisions: Revision[];
|
revisions: Revision[];
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
_ => AuthorColor,
|
_ => AuthorColor,
|
||||||
authorColor => authorColor.note,
|
authorColor => authorColor.note,
|
||||||
|
|
Loading…
Reference in a new issue