Sprint 0: Updated inventories (MASTER/BACKEND/DATABASE) with verified baseline Sprint 1: Fixed 8 P0 blockers - CFDI entities (schema cfdi→fiscal), auth base DDL, billing duplication (→operations), 5 project entities, PaymentInvoiceAllocation, core.companies DDL, recreate-database.sh array Sprint 2: 4 new auth entities, session/role/permission DDL reconciliation, CFDI PAC+StampQueue, partner address+contact alignment Sprint 3: CFDI service+controller+routes, mobile service+controller+routes, inventory extended DDL (7 tables) Sprint 4: timestamp→timestamptz (40 files), field divergences, token/roles/permissions service alignment with new DDL-aligned entities Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
36 lines
791 B
TypeScript
36 lines
791 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
Index,
|
|
} from 'typeorm';
|
|
|
|
@Entity({ schema: 'core', name: 'countries' })
|
|
@Index('idx_countries_code', ['code'], { unique: true })
|
|
export class Country {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column({ type: 'varchar', length: 2, nullable: false, unique: true })
|
|
code: string;
|
|
|
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
name: string;
|
|
|
|
@Column({ type: 'varchar', length: 10, nullable: true, name: 'phone_code' })
|
|
phoneCode: string | null;
|
|
|
|
@Column({
|
|
type: 'varchar',
|
|
length: 3,
|
|
nullable: true,
|
|
name: 'currency_code',
|
|
})
|
|
currencyCode: string | null;
|
|
|
|
// Audit fields
|
|
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
createdAt: Date;
|
|
}
|