mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-10-20 14:12:10 -04:00
f81e67a3a1
Signed-off-by: David Mehren <git@herrmehren.de>
22 lines
439 B
TypeScript
22 lines
439 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { Column, Entity, ManyToMany, PrimaryGeneratedColumn } from 'typeorm';
|
|
import { Note } from './note.entity';
|
|
|
|
@Entity()
|
|
export class Tag {
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@Column({
|
|
nullable: false,
|
|
})
|
|
name: string;
|
|
|
|
@ManyToMany((_) => Note, (note) => note.tags)
|
|
notes: Note[];
|
|
}
|