Improve Page

* ページをピン留めできるように
* デッキでカラム内でページを見れるように
This commit is contained in:
syuilo 2019-07-07 06:56:13 +09:00
parent 4b747d20b7
commit bd8d7c3d0f
32 changed files with 295 additions and 55 deletions

View file

@ -1,6 +1,7 @@
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
import { id } from '../id';
import { User } from './user';
import { Page } from './page';
@Entity()
export class UserProfile {
@ -118,6 +119,18 @@ export class UserProfile {
})
public carefulBot: boolean;
@Column({
...id(),
nullable: true
})
public pinnedPageId: Page['id'] | null;
@OneToOne(type => Page, {
onDelete: 'SET NULL'
})
@JoinColumn()
public pinnedPage: Page | null;
//#region Linking
@Column('boolean', {
default: false,