|
@@ -13,7 +13,7 @@ export function createCrudRoutes<
|
|
|
GetSchema extends z.ZodSchema = z.ZodSchema,
|
|
GetSchema extends z.ZodSchema = z.ZodSchema,
|
|
|
ListSchema extends z.ZodSchema = z.ZodSchema
|
|
ListSchema extends z.ZodSchema = z.ZodSchema
|
|
|
>(options: CrudOptions<T, CreateSchema, UpdateSchema, GetSchema, ListSchema>) {
|
|
>(options: CrudOptions<T, CreateSchema, UpdateSchema, GetSchema, ListSchema>) {
|
|
|
- const { entity, createSchema, updateSchema, getSchema, listSchema, searchFields, middleware = [] } = options;
|
|
|
|
|
|
|
+ const { entity, createSchema, updateSchema, getSchema, listSchema, searchFields, relations, middleware = [] } = options;
|
|
|
|
|
|
|
|
// 创建CRUD服务实例
|
|
// 创建CRUD服务实例
|
|
|
// 抽象类不能直接实例化,需要创建具体实现类
|
|
// 抽象类不能直接实例化,需要创建具体实现类
|