feat(container): add CRUD operations for container management
- Implemented routes for listing, retrieving, updating, and deleting containers. - Added ContainerModel with necessary fields and methods for data handling. - Created utility functions for fetching container data by ID. feat(page): enhance page management with CRUD and publish functionality - Developed routes for managing pages, including listing, updating, and deleting. - Integrated caching and zip file generation for page exports. - Added publish functionality to manage app versions and file uploads. feat(prompts): implement prompt management with CRUD operations - Created routes for listing, updating, and deleting prompts. - Added pagination and search capabilities for prompt listing. test: add common query utilities and prompt tests - Implemented common query utilities for API interactions. - Added tests for prompt listing functionality.
This commit is contained in:
@@ -1,14 +1,3 @@
|
||||
import { pgTable, serial, text, varchar, uuid, boolean, jsonb, timestamp } from "drizzle-orm/pg-core";
|
||||
import { InferSelectModel, InferInsertModel } from "drizzle-orm";
|
||||
|
||||
export const aiUsages = pgTable('cf_ai_usage_cache', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
owner: uuid('owner'),
|
||||
data: jsonb('data').notNull().default({}),
|
||||
createdAt: timestamp('createdAt').notNull().defaultNow(),
|
||||
updatedAt: timestamp('updatedAt').notNull().defaultNow(),
|
||||
deletedAt: timestamp('deletedAt'),
|
||||
});
|
||||
|
||||
// 类型推断
|
||||
export type AiUsage = InferSelectModel<typeof aiUsages>;
|
||||
import { pgTable, uuid, jsonb, timestamp, text } from "drizzle-orm/pg-core";
|
||||
import { InferSelectModel, InferInsertModel, desc } from "drizzle-orm";
|
||||
export * from './drizzle/schema.ts';
|
||||
Reference in New Issue
Block a user