70a7800927
* プロフィールにその人が作ったPlayの一覧出せるように * Update CHANGELOG.md * playの公開範囲を設定できるように * 間違えて変更してしまったのを修正 * Update packages/frontend/src/pages/flash/flash-edit.vue * Update packages/frontend/src/pages/flash/flash-edit.vue * tweak * Update packages/backend/migration/1690796169261-play-visibility.js * Update packages/backend/src/models/entities/Flash.ts * Update packages/backend/src/models/entities/Flash.ts * Update Flash.ts --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
74 lines
1.3 KiB
TypeScript
74 lines
1.3 KiB
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
|
import { id } from '../id.js';
|
|
import { MiUser } from './User.js';
|
|
|
|
@Entity('flash')
|
|
export class MiFlash {
|
|
@PrimaryColumn(id())
|
|
public id: string;
|
|
|
|
@Index()
|
|
@Column('timestamp with time zone', {
|
|
comment: 'The created date of the Flash.',
|
|
})
|
|
public createdAt: Date;
|
|
|
|
@Index()
|
|
@Column('timestamp with time zone', {
|
|
comment: 'The updated date of the Flash.',
|
|
})
|
|
public updatedAt: Date;
|
|
|
|
@Column('varchar', {
|
|
length: 256,
|
|
})
|
|
public title: string;
|
|
|
|
@Column('varchar', {
|
|
length: 1024,
|
|
})
|
|
public summary: string;
|
|
|
|
@Index()
|
|
@Column({
|
|
...id(),
|
|
comment: 'The ID of author.',
|
|
})
|
|
public userId: MiUser['id'];
|
|
|
|
@ManyToOne(type => MiUser, {
|
|
onDelete: 'CASCADE',
|
|
})
|
|
@JoinColumn()
|
|
public user: MiUser | null;
|
|
|
|
@Column('varchar', {
|
|
length: 65536,
|
|
})
|
|
public script: string;
|
|
|
|
@Column('varchar', {
|
|
length: 256, array: true, default: '{}',
|
|
})
|
|
public permissions: string[];
|
|
|
|
@Column('integer', {
|
|
default: 0,
|
|
})
|
|
public likedCount: number;
|
|
|
|
/**
|
|
* public ... 公開
|
|
* private ... プロフィールには表示しない
|
|
*/
|
|
@Column('varchar', {
|
|
length: 512, default: 'public',
|
|
})
|
|
public visibility: 'public' | 'private';
|
|
}
|