Initial commit: ERP system with advance verification fixes
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, OneToMany } from 'typeorm';
|
||||
import { Project } from '../projects/project.entity';
|
||||
import { Quotation } from '../quotations/quotation.entity';
|
||||
|
||||
@Entity('customers')
|
||||
export class Customer {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: false })
|
||||
name: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||||
contact_person: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 50, nullable: true })
|
||||
phone: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||||
email: string;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
address: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@OneToMany(() => Project, project => project.customer)
|
||||
projects: Project[];
|
||||
|
||||
@OneToMany(() => Quotation, quotation => quotation.customer)
|
||||
quotations: Quotation[];
|
||||
}
|
||||
Reference in New Issue
Block a user