(refactor) better types

This commit is contained in:
kakkokari-gtyih 2023-11-09 21:20:33 +09:00
parent 4406af58f1
commit 3439a29c14
4 changed files with 67 additions and 75 deletions

View file

@ -4,12 +4,9 @@
*/
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
import { noteVisibilities } from '@/types.js';
import { MiNote } from '@/models/Note.js';
import type { MiNoteCreateOption } from '@/types.js';
import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiChannel } from './Channel.js';
import type { MiDriveFile } from './DriveFile.js';
@Entity('note_schedule')
export class MiNoteSchedule {
@ -17,7 +14,7 @@ export class MiNoteSchedule {
public id: string;
@Column('jsonb')
public note:{createdAt?: Date | undefined ; apEmojis: any[] | undefined; visibility: any; apMentions: any[] | undefined; visibleUsers: MiUser[]; channel: null | MiChannel; poll: { multiple: any; choices: any; expiresAt: Date | null } | undefined; renote: null | MiNote; localOnly: any; cw: any; apHashtags: any[] | undefined; reactionAcceptance: any; files: MiDriveFile[]; text: any; reply: null | MiNote };
public note: MiNoteCreateOption;
@Index()
@Column('varchar', {