2021-01-05 16:12:38 -05:00
|
|
|
/*
|
2021-01-06 15:36:07 -05:00
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2021-01-05 16:12:38 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2020-08-13 14:22:30 -04:00
|
|
|
import { Column, Entity, ManyToOne } from 'typeorm/index';
|
|
|
|
import { User } from '../users/user.entity';
|
|
|
|
import { Note } from './note.entity';
|
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class AuthorColor {
|
2021-01-06 17:48:53 -05:00
|
|
|
@ManyToOne((_) => Note, (note) => note.authorColors, {
|
|
|
|
primary: true,
|
|
|
|
})
|
2020-08-13 14:22:30 -04:00
|
|
|
note: Note;
|
|
|
|
|
2021-01-06 17:48:53 -05:00
|
|
|
@ManyToOne((_) => User, {
|
2020-08-13 14:22:30 -04:00
|
|
|
primary: true,
|
|
|
|
})
|
|
|
|
user: User;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
color: string;
|
|
|
|
}
|