NoteEntity: Formatting fixes

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-09-19 15:57:57 +02:00
parent 4ff60b162e
commit 8c050b3c2f
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -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,