EENE Dashboard upload to Gitea

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-17 16:59:34 +09:00
parent cf72281c6d
commit b3f2da203b
138 changed files with 13013 additions and 1929 deletions

View File

@@ -0,0 +1,45 @@
/**
* 팀원이 0명일 때만 hr-data.json TEAM → team_members (업무는 건드리지 않음)
*/
import 'dotenv/config';
import { PrismaClient } from '@prisma/client';
import { mapHrTeamMembers } from '../prisma/mapHrProjects';
const prisma = new PrismaClient();
async function main() {
const count = await prisma.teamMember.count();
if (count > 0) {
console.log('✓ Team members exist — skip TEAM seed');
return;
}
const teamParsed = mapHrTeamMembers();
if (teamParsed.length === 0) {
console.log('✓ hr-data.json TEAM empty — skip');
return;
}
for (const tm of teamParsed) {
await prisma.teamMember.create({
data: {
name: tm.name,
rank: tm.rank,
role: tm.role,
cell: tm.cell,
photoUrl: tm.photoUrl,
sortOrder: tm.sortOrder,
isActive: true,
},
});
}
console.log(`✅ Team members seeded: ${teamParsed.length}명 (hr-data.json TEAM)`);
}
main()
.catch((err) => {
console.error(err);
process.exit(1);
})
.finally(() => prisma.$disconnect());