flnxi-Wu/scripts/inspect-category-options.ts
WuYongJie d1c6efc79d
Some checks failed
CI Check / check (push) Has been cancelled
feat: NAS 部署与 Harbor 推送流程
2025-12-03 14:39:06 +08:00

34 lines
639 B
TypeScript

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
async function main() {
const fields = await prisma.uploadField.findMany({
where: {
addToCategory: true,
key: {
in: ['categoryName', 'sceneName', 'platformName'],
},
},
select: {
id: true,
key: true,
label: true,
optionsStatic: true,
},
})
fields.forEach((field) => {
console.log('---', field.key, field.label)
console.log(field.optionsStatic)
})
}
main()
.catch((error) => {
console.error(error)
process.exitCode = 1
})
.finally(() => prisma.$disconnect())