import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient() async function main() { console.log('🌱 Starting comprehensive database seeding...') // Clear existing data await prisma.enrollment.deleteMany() await prisma.fAQ.deleteMany() await prisma.course.deleteMany() await prisma.user.deleteMany() // Create admin users const admin = await prisma.user.create({ data: { email: 'admin@university.edu', name: 'Dr. Emily Chen', role: 'ADMIN', }, }) const advisor1 = await prisma.user.create({ data: { email: 'advisor.marine@university.edu', name: 'Prof. Sarah Mitchell', role: 'ADMIN', }, }) const advisor2 = await prisma.user.create({ data: { email: 'advisor.engineering@university.edu', name: 'Dr. James Rodriguez', role: 'ADMIN', }, }) // Create diverse student users representing global UTAS community const students = await Promise.all([ prisma.user.create({ data: { email: 'student@university.edu', name: 'Maya Patel', role: 'STUDENT', year: 2, faculty: 'Marine and Antarctic Science', balance: 2500.00, advisorId: advisor1.id, }, }), prisma.user.create({ data: { email: 'john.engineering@university.edu', name: 'John Thompson', role: 'STUDENT', year: 3, faculty: 'Engineering', balance: 1800.00, advisorId: advisor2.id, }, }), prisma.user.create({ data: { email: 'amira.arts@university.edu', name: 'Amira Al-Rashid', role: 'STUDENT', year: 1, faculty: 'Creative Arts and Design', balance: 3200.00, advisorId: admin.id, }, }), prisma.user.create({ data: { email: 'lucas.business@university.edu', name: 'Lucas Chen', role: 'STUDENT', year: 4, faculty: 'Business and Law', balance: 950.00, advisorId: admin.id, }, }), prisma.user.create({ data: { email: 'sophia.health@university.edu', name: 'Sophia Williams', role: 'STUDENT', year: 2, faculty: 'Health and Medicine', balance: 4100.00, advisorId: advisor1.id, }, }), prisma.user.create({ data: { email: 'ahmed.science@university.edu', name: 'Ahmed Hassan', role: 'STUDENT', year: 3, faculty: 'Science, Technology and Engineering', balance: 2750.00, advisorId: advisor2.id, }, }), ]) // Create comprehensive course catalog representing UTAS excellence const courses = await Promise.all([ // Marine and Antarctic Science - UTAS's #1 Global Program prisma.course.create({ data: { code: 'MARS301', name: 'Marine Ecosystem Dynamics', description: 'Advanced study of marine ecosystems using IMAS research facilities. Field work in Southern Ocean.', credits: 4, semester: 'Spring 2025', schedule: 'MWF 9:00-11:00 + Field Work', }, }), prisma.course.create({ data: { code: 'ANTR401', name: 'Antarctic Climate Science', description: 'Climate change research methods using real Antarctic data from UTAS research stations.', credits: 4, semester: 'Fall 2025', schedule: 'TTh 14:00-17:00', }, }), // Engineering Excellence prisma.course.create({ data: { code: 'ENGR201', name: 'Sustainable Engineering Design', description: 'Engineering principles focused on sustainability and carbon-neutral solutions.', credits: 3, semester: 'Spring 2025', schedule: 'MWF 10:00-11:30', }, }), prisma.course.create({ data: { code: 'SOFT301', name: 'AI and Machine Learning', description: 'Advanced AI applications in environmental monitoring and climate prediction.', credits: 4, semester: 'Fall 2025', schedule: 'TTh 13:00-15:30', }, }), // Creative Arts Innovation prisma.course.create({ data: { code: 'ARTS205', name: 'Digital Media and Sustainability', description: 'Creating digital art that raises awareness about climate action and environmental issues.', credits: 3, semester: 'Spring 2025', schedule: 'MW 14:00-17:00', }, }), // Business and Innovation prisma.course.create({ data: { code: 'BUSI350', name: 'Sustainable Business Strategy', description: 'Developing business models aligned with UN Sustainable Development Goals.', credits: 3, semester: 'Fall 2025', schedule: 'TTh 9:00-10:30', }, }), // Health and Medicine prisma.course.create({ data: { code: 'HLTH250', name: 'Climate Health and Medicine', description: 'Understanding health impacts of climate change and developing adaptive healthcare strategies.', credits: 3, semester: 'Spring 2025', schedule: 'MWF 11:00-12:00', }, }), // Core Requirements prisma.course.create({ data: { code: 'MATH201', name: 'Statistics for Environmental Science', description: 'Applied statistics with focus on environmental data analysis and climate modeling.', credits: 4, semester: 'Both Semesters', schedule: 'MWF 8:00-9:00', }, }), // Interdisciplinary Innovation prisma.course.create({ data: { code: 'INTR401', name: 'Climate Action Leadership', description: 'Capstone course combining multiple disciplines to address real-world climate challenges.', credits: 4, semester: 'Spring 2025', schedule: 'TTh 15:00-18:00', }, }), // International Focus prisma.course.create({ data: { code: 'INTL301', name: 'Global Sustainability Partnerships', description: 'Collaborative projects with international universities on sustainability initiatives.', credits: 3, semester: 'Fall 2025', schedule: 'Online + Intensive Workshops', }, }), ]) // Create realistic enrollments showcasing student diversity const enrollments = await Promise.all([ // Maya Patel (Marine Science student) prisma.enrollment.create({ data: { userId: students[0].id, courseId: courses[0].id, // Marine Ecosystem Dynamics grade: 'A', status: 'ENROLLED', }, }), prisma.enrollment.create({ data: { userId: students[0].id, courseId: courses[1].id, // Antarctic Climate Science grade: 'A-', status: 'ENROLLED', }, }), // John Thompson (Engineering student) prisma.enrollment.create({ data: { userId: students[1].id, courseId: courses[2].id, // Sustainable Engineering grade: 'B+', status: 'ENROLLED', }, }), prisma.enrollment.create({ data: { userId: students[1].id, courseId: courses[3].id, // AI and ML grade: 'A-', status: 'ENROLLED', }, }), // Amira Al-Rashid (Arts student) prisma.enrollment.create({ data: { userId: students[2].id, courseId: courses[4].id, // Digital Media grade: 'A', status: 'ENROLLED', }, }), // Lucas Chen (Business student) prisma.enrollment.create({ data: { userId: students[3].id, courseId: courses[5].id, // Sustainable Business grade: 'B+', status: 'ENROLLED', }, }), // Cross-disciplinary enrollments showing UTAS integration prisma.enrollment.create({ data: { userId: students[4].id, // Sophia (Health) courseId: courses[6].id, // Climate Health grade: 'A', status: 'ENROLLED', }, }), prisma.enrollment.create({ data: { userId: students[5].id, // Ahmed (Science) courseId: courses[7].id, // Statistics grade: 'B+', status: 'ENROLLED', }, }), ]) // Create comprehensive FAQ database showcasing UTAS excellence and AI capabilities const faqs = [ // Academic Excellence & Programs { question: 'Why is UTAS ranked #1 globally for climate action?', answer: 'UTAS has been ranked #1 globally for climate action by THE Impact Rankings for four consecutive years (2022-2025) due to our: 100% renewable energy across all campuses, 50% reduction in carbon emissions since 2007, Climate Active Carbon Neutral certification, world-leading research at IMAS (Institute for Marine and Antarctic Studies), and comprehensive sustainability integration across all programs.', category: 'Academic', language: 'en', priority: 1, }, { question: 'How do I access the AI Study Assistant?', answer: 'Our 24/7 AI Study Assistant is available through: 1) The floating chat widget on any portal page, 2) Voice activation by saying "Hey UTAS", 3) Mobile app integration, 4) Smart study room kiosks on campus. The AI provides multilingual support in English and Arabic, personalized study plans, assignment help, and can even detect if you need mental health support.', category: 'Technology', language: 'en', priority: 1, }, { question: 'What makes UTAS marine science programs unique?', answer: 'UTAS marine science is globally recognized through IMAS with: Direct access to Antarctic research stations, World-class research vessels for hands-on learning, Partnerships with Australian Antarctic Division, Real-time Southern Ocean monitoring systems, Industry collaborations with fishing and aquaculture sectors, and Graduate employment rate of 95% within 6 months.', category: 'Academic', language: 'en', priority: 1, }, { question: 'How does the predictive analytics system work?', answer: 'Our AI-powered analytics track your: Academic performance patterns, Study habits and engagement levels, Assignment submission timing, Library and resource usage, Extracurricular participation. The system provides early intervention alerts, personalized study recommendations, career pathway suggestions, and can predict graduation success probability with 94% accuracy.', category: 'Technology', language: 'en', priority: 2, }, // International & Multilingual Support { question: 'كيف يمكنني الحصول على الدعم باللغة العربية؟', answer: 'توفر جامعة تاسمانيا دعماً شاملاً باللغة العربية من خلال: مساعد ذكي متاح 24/7 باللغة العربية، مستشارين أكاديميين يتحدثون العربية، خدمات ترجمة فورية في الحرم الجامعي، مجتمع طلابي عربي نشط، وبرامج توجيه خاصة للطلاب الدوليين الناطقين بالعربية.', category: 'International', language: 'ar', priority: 1, }, { question: 'What international opportunities are available?', answer: 'UTAS offers extensive international experiences: Antarctic research expeditions, Student exchange with 200+ partner universities, International internship placements, Global sustainability project collaborations, Study abroad in 40+ countries, International conference presentations, and Global virtual classroom partnerships.', category: 'International', language: 'en', priority: 2, }, // Student Support & Mental Health { question: 'How does the AI mental health support work?', answer: 'Our AI mental health system provides: 24/7 mood and stress level monitoring through voluntary check-ins, Early detection of crisis indicators in academic performance, Anonymous peer support matching, Immediate crisis intervention protocols, Integration with on-campus counseling services, and Predictive wellness recommendations. All data is encrypted and privacy-protected.', category: 'Wellbeing', language: 'en', priority: 1, }, { question: 'What financial support is available?', answer: 'UTAS offers comprehensive financial assistance: Merit Scholarships up to $15,000/year, Need-based grants for 40% of students, International student scholarships, Emergency financial hardship funds, Work-study programs on campus, Industry-sponsored research positions, and AI-powered budget planning tools in your portal.', category: 'Financial', language: 'en', priority: 2, }, // Campus Life & Sustainability { question: 'How is UTAS achieving carbon neutrality?', answer: 'UTAS is already Climate Active Carbon Neutral certified through: 100% renewable energy from wind and solar, Campus-wide energy efficiency systems, Zero waste to landfill programs, Sustainable transport initiatives, Carbon offset research projects, Green building standards for all construction, and Student-led sustainability projects.', category: 'Sustainability', language: 'en', priority: 1, }, { question: 'What accessibility features does the portal have?', answer: 'Our AI-powered accessibility features include: Automatic alt-text generation for all images, Voice navigation and screen reader optimization, Real-time WCAG compliance checking, Customizable UI for visual impairments, Cognitive load adaptation based on user needs, Multi-language content translation, and Predictive accessibility recommendations.', category: 'Accessibility', language: 'en', priority: 2, }, // Research & Innovation { question: 'How can I get involved in climate research?', answer: 'Students can participate in climate research through: IMAS undergraduate research programs, Antarctic field work opportunities, Climate modeling projects using supercomputing facilities, Industry partnership projects, International collaboration research, Paid research assistant positions, and Publication opportunities in peer-reviewed journals.', category: 'Research', language: 'en', priority: 2, }, { question: 'What industry connections does UTAS have?', answer: 'UTAS maintains strong industry partnerships with: Tasmanian salmon farming industry, Antarctic logistics companies, Renewable energy providers, Australian government agencies, International climate organizations, Technology startups, Mining and resources sector, and Creative industries. 89% of graduates secure employment within 6 months.', category: 'Career', language: 'en', priority: 2, }, // Technology & Innovation { question: 'How do I use the virtual campus tour?', answer: 'Access our AI-powered virtual tours through: Portal homepage virtual tour button, Mobile app AR campus navigation, VR headsets in student lounges, Interactive campus maps with real-time information, 360° facility tours including research labs, Live streaming from research vessels, and Virtual reality Antarctic station tours.', category: 'Technology', language: 'en', priority: 3, }, { question: 'What smart campus features are available?', answer: 'UTAS smart campus includes: IoT-enabled study space booking, Real-time campus energy usage displays, Smart parking with availability alerts, Automated library services, Environmental monitoring stations, Smart building climate controls, Campus-wide WiFi 6 connectivity, and AI-powered resource optimization.', category: 'Campus', language: 'en', priority: 3, }, // Practical Information { question: 'How do I register for classes?', answer: 'Class registration uses our AI-enhanced system: Login to student portal dashboard, Use the "Smart Schedule Builder" for optimal timetables, AI recommendations based on degree progress, Real-time seat availability updates, Waitlist management with priority notifications, Cross-campus course coordination, and Integration with academic advisor approval.', category: 'Academic', language: 'en', priority: 2, }, { question: 'Where can I find study spaces?', answer: 'UTAS provides diverse study environments: 24/7 smart study pods with climate control, Collaborative spaces with interactive whiteboards, Silent zones with noise-canceling technology, Outdoor study areas with device charging, Library spaces with real-time availability, Specialist research environments, and Bookable group project rooms through the portal.', category: 'Campus', language: 'en', priority: 3, }, // Advanced Features Demo { question: 'How does the portal learn my preferences?', answer: 'Our adaptive AI system learns through: Your interaction patterns and click behavior, Study schedule optimization preferences, Content consumption habits, Accessibility needs and modifications, Language and communication preferences, Academic goal tracking, and Performance correlation analysis. All learning is opt-in and privacy-protected.', category: 'Technology', language: 'en', priority: 3, }, ] await Promise.all( faqs.map(faq => prisma.fAQ.create({ data: faq })) ) console.log('✅ Database seeded successfully with comprehensive UTAS data!') console.log(`📊 Created:`) console.log(` 👤 ${students.length} students + 3 staff members`) console.log(` 📚 ${courses.length} courses across all UTAS faculties`) console.log(` 📝 ${enrollments.length} student enrollments`) console.log(` ❓ ${faqs.length} comprehensive FAQs`) console.log(`🎯 Portal ready for demo with realistic UTAS data!`) } main() .catch((e) => { console.error(e) process.exit(1) }) .finally(async () => { await prisma.$disconnect() })