Backend half

This commit is contained in:
2025-07-11 19:56:28 +02:00
parent fa868e7c1d
commit 8600fa7c1d
19426 changed files with 3750448 additions and 8108 deletions
@@ -0,0 +1,39 @@
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
OneToMany
} from 'typeorm';
import { User } from './user.entity';
@Entity('Company')
export class Company {
@PrimaryGeneratedColumn()
CompanyId!: number;
@Column({ type: 'varchar', length: 255, nullable: false })
Name!: string;
@Column({ type: 'varchar', length: 255, nullable: false })
ContactFirstName!: string;
@Column({ type: 'varchar', length: 255, nullable: false })
ContactLastName!: string;
@Column({ type: 'varchar', length: 255, nullable: false })
ContactEmail!: string;
@Column({ type: 'varchar', length: 255, nullable: false })
FirstAPI!: string;
@Column({ type: 'varchar', length: 255, nullable: false })
TokenAPI!: string;
@CreateDateColumn()
RegDate!: Date;
// Relation to User entity (optional)
@OneToMany(() => User, user => user.company)
users!: User[];
}