yourname 5 月之前
父節點
當前提交
be81881a79

+ 1 - 0
src/server/data-source.ts

@@ -1,3 +1,4 @@
+import 'reflect-metadata';
 import { DataSource } from 'typeorm';
 import { DataSource } from 'typeorm';
 import { Customer } from './modules/customers/customer.entity';
 import { Customer } from './modules/customers/customer.entity';
 import { Contact } from './modules/contacts/contact.entity';
 import { Contact } from './modules/contacts/contact.entity';

+ 1 - 1
src/server/modules/contacts/contact.entity.ts

@@ -1,5 +1,5 @@
 import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
 import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
-import { z } from 'zod';
+import { z } from '@hono/zod-openapi';
 import { Customer } from '@/server/modules/customers/customer.entity';
 import { Customer } from '@/server/modules/customers/customer.entity';
 
 
 @Entity('contacts')
 @Entity('contacts')

+ 1 - 1
src/server/modules/customers/customer.entity.ts

@@ -1,6 +1,6 @@
 import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
 import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
 import { z } from '@hono/zod-openapi';
 import { z } from '@hono/zod-openapi';
-import { Contact } from '@/server/modules/contacts/contact.entity';
+import { Contact } from '../contacts/contact.entity';
 import { Opportunity } from '@/server/modules/opportunities/opportunity.entity';
 import { Opportunity } from '@/server/modules/opportunities/opportunity.entity';
 import { Contract } from '@/server/modules/contracts/contract.entity';
 import { Contract } from '@/server/modules/contracts/contract.entity';
 import { Ticket } from '@/server/modules/tickets/ticket.entity';
 import { Ticket } from '@/server/modules/tickets/ticket.entity';

+ 1 - 1
src/server/modules/leads/lead.entity.ts

@@ -1,5 +1,5 @@
 import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
 import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
-import { z } from 'zod';
+import { z } from '@hono/zod-openapi';
 import { Customer } from '@/server/modules/customers/customer.entity';
 import { Customer } from '@/server/modules/customers/customer.entity';
 import { User } from '@/server/modules/users/user.entity';
 import { User } from '@/server/modules/users/user.entity';
 
 

+ 1 - 1
src/server/modules/opportunities/opportunity.entity.ts

@@ -1,5 +1,5 @@
 import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
 import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
-import { z } from 'zod';
+import { z } from '@hono/zod-openapi';
 import { Customer } from '@/server/modules/customers/customer.entity';
 import { Customer } from '@/server/modules/customers/customer.entity';
 import { User } from '@/server/modules/users/user.entity';
 import { User } from '@/server/modules/users/user.entity';