96 switch from azure table storage to sqlite (#97)
* adding typeorm to api * switching to sqlite * switching to sqlite * switching to sqlite * migrating to sqlite * updating terraform * updating infrastructure
This commit was merged in pull request #97.
This commit is contained in:
18
api/src/endorsement/endorsement.entity.ts
Normal file
18
api/src/endorsement/endorsement.entity.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { PilotEntity } from 'src/pilot/pilot.entity';
|
||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||
|
||||
@Entity({ name: 'endorsements' })
|
||||
export class EndorsementEntity {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string
|
||||
|
||||
@Column()
|
||||
type: string;
|
||||
|
||||
@Column()
|
||||
issueDate: Date;
|
||||
|
||||
@ManyToOne(() => PilotEntity, (pilot: PilotEntity) => pilot.endorsements, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
|
||||
@JoinColumn({ name: 'pilotId' })
|
||||
pilot: PilotEntity
|
||||
}
|
||||
Reference in New Issue
Block a user