2023-11-06 10:15:29 +01:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
2023-11-09 13:20:33 +01:00
|
|
|
import type { MiNoteCreateOption } from '@/types.js';
|
2023-11-06 10:15:29 +01:00
|
|
|
import { id } from './util/id.js';
|
|
|
|
import { MiUser } from './User.js';
|
|
|
|
|
|
|
|
@Entity('note_schedule')
|
2023-11-09 13:34:18 +01:00
|
|
|
export class MiScheduledNote {
|
2023-11-06 10:15:29 +01:00
|
|
|
@PrimaryColumn(id())
|
2023-11-08 07:33:46 +01:00
|
|
|
public id: string;
|
2023-11-06 10:15:29 +01:00
|
|
|
|
2023-11-08 07:33:46 +01:00
|
|
|
@Column('jsonb')
|
2023-11-09 13:20:33 +01:00
|
|
|
public note: MiNoteCreateOption;
|
2023-11-06 10:15:29 +01:00
|
|
|
|
2023-11-09 08:09:51 +01:00
|
|
|
@Index()
|
2023-11-08 07:33:46 +01:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 260,
|
2023-11-06 10:15:29 +01:00
|
|
|
})
|
2023-11-08 07:33:46 +01:00
|
|
|
public userId: MiUser['id'];
|
2023-11-09 08:09:51 +01:00
|
|
|
|
|
|
|
@Column('timestamp with time zone')
|
2023-11-14 09:27:52 +01:00
|
|
|
public scheduledAt: Date;
|
2023-11-06 10:15:29 +01:00
|
|
|
}
|