mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-10-20 22:22:09 -04:00
24 lines
389 B
TypeScript
24 lines
389 B
TypeScript
|
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;
|
||
|
}
|