Add customer and contact record management features

This commit is contained in:
Ken Yasue
2025-03-25 06:49:21 +01:00
parent 4e9d81924a
commit 1866d84a86
13 changed files with 917 additions and 6 deletions

View File

@ -0,0 +1,27 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, ManyToOne, JoinColumn } from 'typeorm';
import type { Customer } from './Customer';
@Entity('contact_records')
export class ContactRecord {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
customerId: string;
@Column()
contactType: string;
@Column('text')
notes: string;
@CreateDateColumn()
createdAt: Date;
@UpdateDateColumn()
modifiedAt: Date;
@ManyToOne('Customer', 'contactRecords')
@JoinColumn({ name: 'customerId' })
customer: Customer;
}