mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add feed entity
This commit is contained in:
parent
e282eea99f
commit
878d881e05
1 changed files with 37 additions and 0 deletions
37
packages/api/src/entity/feed.ts
Normal file
37
packages/api/src/entity/feed.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm'
|
||||
|
||||
@Entity()
|
||||
export class Feed {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string
|
||||
|
||||
@Column('text')
|
||||
title!: string
|
||||
|
||||
@Column('text')
|
||||
url!: string
|
||||
|
||||
@Column('text')
|
||||
author?: string
|
||||
|
||||
@Column('text')
|
||||
description?: string
|
||||
|
||||
@Column('text')
|
||||
image?: string
|
||||
|
||||
@CreateDateColumn({ default: () => 'CURRENT_TIMESTAMP' })
|
||||
createdAt!: Date
|
||||
|
||||
@UpdateDateColumn({ default: () => 'CURRENT_TIMESTAMP' })
|
||||
updatedAt!: Date
|
||||
|
||||
@Column('timestamptz')
|
||||
publishedAt?: Date | null
|
||||
}
|
||||
Loading…
Reference in a new issue