1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-05 02:08:56 +09:00

Update Event.ts

This commit is contained in:
syuilo 2023-08-20 13:35:27 +09:00
parent e29736b4b8
commit 119bb553bc

View File

@ -1,19 +1,19 @@
import { Entity, Index, Column, PrimaryColumn, OneToOne, JoinColumn } from 'typeorm';
import { id } from '../id.js';
import { noteVisibilities } from '../../types.js';
import { Note } from './Note.js';
import type { User } from './User.js';
import { MiNote } from './Note.js';
import type { MiUser } from './User.js';
@Entity()
export class Event {
@Entity('event')
export class MiEvent {
@PrimaryColumn(id())
public noteId: Note['id'];
public noteId: MiNote['id'];
@OneToOne(type => Note, {
@OneToOne(type => MiNote, {
onDelete: 'CASCADE',
})
@JoinColumn()
public note: Note | null;
public note: MiNote | null;
@Index()
@Column('timestamp with time zone', {
@ -55,7 +55,7 @@ export class Event {
...id(),
comment: '[Denormalized]',
})
public userId: User['id'];
public userId: MiUser['id'];
@Index()
@Column('varchar', {