hedgedoc/src/notes/author-color.entity.ts
Philip Molares 6896daa62a added reuse information
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-05 22:12:38 +01:00

29 lines
517 B
TypeScript

/*
* SPDX-FileCopyrightText: 2020 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Column, Entity, ManyToOne } from 'typeorm/index';
import { User } from '../users/user.entity';
import { Note } from './note.entity';
@Entity()
export class AuthorColor {
@ManyToOne(
_ => Note,
note => note.authorColors,
{
primary: true,
},
)
note: Note;
@ManyToOne(_ => User, {
primary: true,
})
user: User;
@Column()
color: string;
}