|
@@ -1,11 +1,11 @@
|
|
|
-import { Entity, PrimaryColumn, Column, Index, ForeignKey } from 'typeorm';
|
|
|
|
|
|
|
+import { Entity, PrimaryGeneratedColumn, Column, Index, ForeignKey } from 'typeorm';
|
|
|
import { Client } from '../clients/client.entity';
|
|
import { Client } from '../clients/client.entity';
|
|
|
import { z } from '@hono/zod-openapi';
|
|
import { z } from '@hono/zod-openapi';
|
|
|
|
|
|
|
|
@Entity('hetong')
|
|
@Entity('hetong')
|
|
|
export class Hetong {
|
|
export class Hetong {
|
|
|
- @PrimaryColumn({ name: 'id', type: 'varchar', length: 50 })
|
|
|
|
|
- id!: string;
|
|
|
|
|
|
|
+ @PrimaryGeneratedColumn({ name: 'id', type: 'int', unsigned: true })
|
|
|
|
|
+ id!: number;
|
|
|
|
|
|
|
|
@Column({ name: 'contract_date', type: 'date' })
|
|
@Column({ name: 'contract_date', type: 'date' })
|
|
|
contractDate!: Date;
|
|
contractDate!: Date;
|