Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@BelongsTo(() => Employee)
employee: Employee;
// Role
@ForeignKey(() => Role)
@Column
roleId: number;
@BelongsTo(() => Role)
role: Role;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
}
lineId: number;
@BelongsTo(() => Line)
line: Line;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@HasMany(() => Project)
projects: Project[];
}
timestamps: true,
tableName: Tables.DOMAINS
})
export class Domain extends Model {
@AllowNull(false)
@Column
name: string;
@Column
active: boolean;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@HasMany(() => Project)
projects: Project[];
@HasMany(() => Customer)
customers: Customer[];
active: boolean;
@Column
image: string;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@ForeignKey(() => Domain)
@Column
domainId: number;
@BelongsTo(() => Domain)
domain: Domain;
@BelongsToMany(() => Project, () => ProjectCustomer)
projects: Project[];
}
roleId: number;
@BelongsTo(() => Role)
role: Role;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
}
@AllowNull(false)
@Column
firstname: string;
@AllowNull(false)
@Column
lastname: string;
@Column
active: boolean;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@HasMany(() => Schedule)
schedules: Schedule[];
@BelongsToMany(() => Technology, () => EmployeeTechnology)
technologies: Technology[];
@Column
domain: string;
@Column
active: boolean;
@Column
image: string;
@Column
version: string;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@BelongsToMany(() => Employee, () => EmployeeTechnology)
employees: Employee[];
@BelongsToMany(() => Project, () => ProjectTechnology)
projects: Project[];
@Column
domain: string;
@Column
leadrole: boolean;
@Column
seniority: string;
@Column
active: boolean;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@HasMany(() => Schedule)
schedules: Schedule[];
}
@Column({
type: DataType.DATE
})
enddate: Date;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@HasMany(() => Schedule)
schedules: Schedule[];
@BelongsToMany(() => Technology, () => ProjectTechnology)
technologies: Technology[];
@BelongsToMany(() => Customer, () => ProjectCustomer)
customers: Customer[];
}
lastname: string;
@Column
active: boolean;
@CreatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
createdAt: Date;
@UpdatedAt
@Column({
type: DataType.DATE,
defaultValue: DataType.NOW
})
updatedAt: Date;
@HasMany(() => Schedule)
schedules: Schedule[];
@BelongsToMany(() => Technology, () => EmployeeTechnology)
technologies: Technology[];
}