Skip to content

Commit

Permalink
Merge pull request #1 from twin-te/add-timestamp
Browse files Browse the repository at this point in the history
Add column "createdAt" to table "users"
  • Loading branch information
takonomura authored Apr 1, 2021
2 parents 92b4402 + affcf3d commit 4d20e6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/database/model/user.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Entity, OneToMany, PrimaryColumn } from 'typeorm'
import { Entity, OneToMany, PrimaryColumn, CreateDateColumn } from 'typeorm'
import { UserAuthentication } from './userAuthentications'

@Entity({
Expand All @@ -15,4 +15,7 @@ export class User {
cascade: true,
})
authentications!: UserAuthentication[]

@CreateDateColumn({ type: 'timestamp' })
createdAt!: Date
}

0 comments on commit 4d20e6d

Please sign in to comment.