- Nodejs > 14
yarn dev
yarn prod
yarn build
- Goto
src/adminjs/resources
- Add Resource (Maybe Prisma, Maybe Custom)
- END :I
import { dmmf, client } from "@/prisma/dmmf";
export const CreatePostResource = () => ({
resource: {
model: dmmf.modelMap.Post,
client,
},
features: [],
options: {
properties: {
content: { type: 'richtext' },
someJson: { type: 'mixed', isArray: true },
'someJson.number': { type: 'number' },
'someJson.string': { type: 'string' },
'someJson.boolean': { type: 'boolean' },
'someJson.date': { type: 'datetime' },
},
},
});
TL;DR
저기 위에 있는 링크 따라가서 코드 구조 가져오면 됨