code: nextjs,frontends,entity (5 files)

This commit is contained in:
2025-12-26 03:42:03 +00:00
parent 33c2d17f21
commit 04cbc10aae
5 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import { getModel } from './get-model'
import { getPrimaryKeyField } from './get-primary-key-field'
import { getModel } from '../../utils/get-model'
import { getPrimaryKeyField } from '../../utils/get-primary-key-field'
export async function readEntity(entity: string, id: string): Promise<unknown | null> {
const model = getModel(entity)

View File

@@ -1,4 +1,4 @@
import { getModel } from './get-model'
import { getModel } from '../../utils/get-model'
export async function createEntity(entity: string, data: Record<string, unknown>): Promise<unknown> {
const model = getModel(entity)

View File

@@ -1,5 +1,5 @@
import { getModel } from './get-model'
import { getPrimaryKeyField } from './get-primary-key-field'
import { getModel } from '../../utils/get-model'
import { getPrimaryKeyField } from '../../utils/get-primary-key-field'
export async function deleteEntity(entity: string, id: string): Promise<boolean> {
const model = getModel(entity)

View File

@@ -1,5 +1,5 @@
import { getModel } from './get-model'
import { getPrimaryKeyField } from './get-primary-key-field'
import { getModel } from '../../utils/get-model'
import { getPrimaryKeyField } from '../../utils/get-primary-key-field'
export async function updateEntity(
entity: string,

View File

@@ -1,4 +1,4 @@
import { getModel } from './get-model'
import { getModel } from '../../utils/get-model'
export async function upsertEntity(
entity: string,