63 lines
1.4 KiB
TypeScript
63 lines
1.4 KiB
TypeScript
import { ProfileEntity } from '../profile/profile.entity'
|
|
import { SkillEntity } from 'src/skill/skill.entity';
|
|
import { StatusEntity } from 'src/status/status.entity';
|
|
import { Entity, PrimaryGeneratedColumn, Column, JoinColumn, ManyToOne, OneToMany, OneToOne, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from 'typeorm';
|
|
|
|
@Entity({ name: 'experiences' })
|
|
export class ExperienceEntity {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column()
|
|
profileId: string;
|
|
|
|
@Column()
|
|
companyName: string;
|
|
|
|
@Column()
|
|
companyGeneric: string
|
|
|
|
@Column()
|
|
title: string;
|
|
|
|
@Column()
|
|
startDate: Date;
|
|
|
|
@Column({ nullable: true })
|
|
endDate: Date;
|
|
|
|
@Column({ nullable: true })
|
|
summary: string | null
|
|
|
|
@Column()
|
|
statusId: number;
|
|
|
|
@CreateDateColumn()
|
|
created: Date;
|
|
|
|
@Column({ nullable: true })
|
|
createdBy: string;
|
|
|
|
@UpdateDateColumn()
|
|
updated: Date;
|
|
|
|
@Column({ nullable: true })
|
|
updatedBy: string;
|
|
|
|
@DeleteDateColumn()
|
|
deleted: Date;
|
|
|
|
@Column({ nullable: true })
|
|
deletedBy: string;
|
|
|
|
@OneToMany(() => SkillEntity, (skill: SkillEntity) => skill.name )
|
|
skills: SkillEntity[];
|
|
|
|
@ManyToOne(() => ProfileEntity, (profile: ProfileEntity) => profile.experiences)
|
|
@JoinColumn({ name: 'profileId' })
|
|
profile: ProfileEntity;
|
|
|
|
@OneToOne(() => StatusEntity, (status: StatusEntity) => status.name )
|
|
@JoinColumn({ name: 'statusId' })
|
|
status: StatusEntity;
|
|
} |