mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2501 from omnivore-app/feat/admin-integrations-table
Add the integrations table to admin so we can reset sync_at for users
This commit is contained in:
commit
f37896fd3a
1 changed files with 27 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ export const registerDatabase = async (secrets: any): Promise<Connection> => {
|
|||
ReceivedEmail,
|
||||
ContentDisplayReport,
|
||||
Group,
|
||||
Integration,
|
||||
],
|
||||
})
|
||||
|
||||
|
|
@ -210,7 +211,7 @@ export class Group extends BaseEntity {
|
|||
name!: string
|
||||
|
||||
@OneToOne(() => User)
|
||||
@JoinColumn({ name: 'created_at' })
|
||||
@JoinColumn({ name: 'created_by' })
|
||||
createdBy!: User
|
||||
|
||||
@Column({ type: 'timestamp', name: 'created_at' })
|
||||
|
|
@ -231,3 +232,28 @@ export class Group extends BaseEntity {
|
|||
@Column('boolean', { default: false, name: 'only_admin_can_see_members' })
|
||||
onlyAdminCanSeeMembers!: boolean
|
||||
}
|
||||
|
||||
@Entity()
|
||||
export class Integration extends BaseEntity {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string
|
||||
|
||||
@JoinColumn({ name: 'user_id' })
|
||||
@ManyToOne(() => User, (user) => user.articles, { eager: true })
|
||||
user!: User
|
||||
|
||||
@Column('varchar', { length: 40 })
|
||||
name!: string
|
||||
|
||||
@Column('boolean', { default: true })
|
||||
enabled!: boolean
|
||||
|
||||
@Column({ type: 'timestamp', name: 'created_at' })
|
||||
createdAt!: Date
|
||||
|
||||
@Column({ type: 'timestamp', name: 'updated_at' })
|
||||
updatedAt!: Date
|
||||
|
||||
@Column({ name: 'synced_at', type: 'timestamp', nullable: true })
|
||||
syncedAt?: Date | null
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue