mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
26 lines
817 B
TypeScript
26 lines
817 B
TypeScript
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
|
|
|
@Entity('communities')
|
|
export class Community extends BaseEntity {
|
|
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
|
id: number
|
|
|
|
@Column({ name: 'public_key', type: 'binary', length: 64, default: null, nullable: true })
|
|
publicKey: Buffer
|
|
|
|
@Column({ name: 'api_version', length: 10, nullable: false })
|
|
apiVersion: string
|
|
|
|
@Column({ name: 'endpoint', length: 255, nullable: false })
|
|
endPoint: string
|
|
|
|
@Column({ name: 'last_announced_at', type: 'datetime', nullable: false })
|
|
lastAnnouncedAt: Date
|
|
|
|
@Column({ name: 'created_at', default: () => 'CURRENT_TIMESTAMP', nullable: false })
|
|
createdAt: Date
|
|
|
|
@Column({ name: 'updated_at', type: 'datetime', nullable: true, default: null })
|
|
updatedAt: Date | null
|
|
}
|