refactor(backend): update directory structure for models
This commit is contained in:
parent
c3db55b5b6
commit
053da10e94
223 changed files with 488 additions and 488 deletions
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import { MiClip } from './Clip.js';
|
||||
|
||||
@Entity('clip_note')
|
||||
@Index(['noteId', 'clipId'], { unique: true })
|
||||
export class MiClipNote {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The note ID.',
|
||||
})
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: MiNote | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The clip ID.',
|
||||
})
|
||||
public clipId: MiClip['id'];
|
||||
|
||||
@ManyToOne(type => MiClip, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public clip: MiClip | null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue