mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
code: nextjs,frontends,entity (5 files)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getModel } from './get-model'
|
||||
import { getModel } from '../../utils/get-model'
|
||||
|
||||
export async function upsertEntity(
|
||||
entity: string,
|
||||
|
||||
Reference in New Issue
Block a user