|
|
@@ -1,4 +1,4 @@
|
|
|
-import { Entity, PrimaryGeneratedColumn, Column, Index, ForeignKey, OneToMany } from 'typeorm';
|
|
|
+import { Entity, PrimaryGeneratedColumn, Column, Index, ForeignKey, OneToMany, ManyToOne } from 'typeorm';
|
|
|
import { HetongRenew } from './hetong-renew.entity';
|
|
|
import { Client } from '../clients/client.entity';
|
|
|
import { z } from '@hono/zod-openapi';
|
|
|
@@ -17,6 +17,8 @@ export class Hetong {
|
|
|
@Column({ name: 'client_id', type: 'int', unsigned: true })
|
|
|
@ForeignKey(() => Client)
|
|
|
clientId!: number;
|
|
|
+ @ManyToOne(() => Client)
|
|
|
+ client!: Client;
|
|
|
|
|
|
@Column({ name: 'project_id', type: 'varchar', length: 50, nullable: true })
|
|
|
projectId?: string;
|