return author name only

This commit is contained in:
Hongbo Wu
2024-06-18 16:59:22 +08:00
parent fa3e6fe341
commit 5d07e554e2
6 changed files with 36 additions and 17 deletions

View File

@ -1,9 +1,11 @@
import {
Column,
CreateDateColumn,
Entity,
JoinColumn,
ManyToOne,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm'
import { User } from './user'
@ -37,9 +39,9 @@ export class Post {
@Column('text', { nullable: true })
thought?: string | null
@Column('timestamptz')
@CreateDateColumn({ type: 'timestamptz' })
createdAt!: Date
@Column('timestamptz')
@UpdateDateColumn({ type: 'timestamptz' })
updatedAt!: Date
}