hedgedoc/src/notes/author-color.entity.ts
Tilman Vatteroth 0c56466dc1
Change year in copyright to 2021
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 22:10:19 +01:00

29 lines
517 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 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;
}