mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-05 10:18:38 +09:00
Update Event.ts
This commit is contained in:
parent
e29736b4b8
commit
119bb553bc
@ -1,19 +1,19 @@
|
|||||||
import { Entity, Index, Column, PrimaryColumn, OneToOne, JoinColumn } from 'typeorm';
|
import { Entity, Index, Column, PrimaryColumn, OneToOne, JoinColumn } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id.js';
|
||||||
import { noteVisibilities } from '../../types.js';
|
import { noteVisibilities } from '../../types.js';
|
||||||
import { Note } from './Note.js';
|
import { MiNote } from './Note.js';
|
||||||
import type { User } from './User.js';
|
import type { MiUser } from './User.js';
|
||||||
|
|
||||||
@Entity()
|
@Entity('event')
|
||||||
export class Event {
|
export class MiEvent {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public noteId: Note['id'];
|
public noteId: MiNote['id'];
|
||||||
|
|
||||||
@OneToOne(type => Note, {
|
@OneToOne(type => MiNote, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: 'CASCADE',
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: MiNote | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column('timestamp with time zone', {
|
||||||
@ -55,7 +55,7 @@ export class Event {
|
|||||||
...id(),
|
...id(),
|
||||||
comment: '[Denormalized]',
|
comment: '[Denormalized]',
|
||||||
})
|
})
|
||||||
public userId: User['id'];
|
public userId: MiUser['id'];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column('varchar', {
|
||||||
|
Loading…
Reference in New Issue
Block a user