'use strict'; /** * Job Listings Seeder * * This seeder creates initial job listings for the careers page. */ module.exports = { async up (queryInterface, Sequelize) { const timestamp = new Date(); // Check if job listings already exist const existingJobs = await queryInterface.sequelize.query( `SELECT id FROM job_listings LIMIT 1`, { type: queryInterface.sequelize.QueryTypes.SELECT } ); if (existingJobs.length > 0) { console.log('Job listings already exist, skipping seeder'); return; } // Insert initial job listings await queryInterface.bulkInsert('job_listings', [ { title: 'Senior Software Engineer', department: 'Engineering', type: 'Full-time', location: 'Manila, Philippines', summary: 'We are looking for an experienced software engineer to join our team.', description: 'As a Senior Software Engineer, you will be responsible for designing, developing, and maintaining software solutions that meet our clients\' needs.', responsibilities: JSON.stringify([ 'Design and implement new features and functionality', 'Write clean, maintainable, and efficient code', 'Collaborate with cross-functional teams', 'Mentor junior developers', 'Participate in code reviews' ]), requirements: JSON.stringify([ '5+ years of software development experience', 'Proficiency in JavaScript/TypeScript', 'Experience with modern frontend frameworks (Vue.js, React, or Angular)', 'Strong problem-solving skills', 'Excellent communication skills' ]), status: 'active', created_at: timestamp, updated_at: timestamp }, { title: 'UX/UI Designer', department: 'Design', type: 'Full-time', location: 'Cebu, Philippines', summary: 'Join our design team to create beautiful and intuitive user experiences.', description: 'As a UX/UI Designer, you will be responsible for creating user-centered designs that balance user needs with business goals.', responsibilities: JSON.stringify([ 'Create wireframes, prototypes, and high-fidelity designs', 'Conduct user research and testing', 'Collaborate with product managers and developers', 'Develop and maintain design systems', 'Stay up-to-date with design trends and best practices' ]), requirements: JSON.stringify([ '3+ years of UX/UI design experience', 'Proficiency in design tools (Figma, Sketch, or Adobe XD)', 'Strong portfolio showcasing your work', 'Understanding of front-end development', 'Excellent communication and collaboration skills' ]), status: 'active', created_at: timestamp, updated_at: timestamp }, { title: 'Project Manager', department: 'Project Management', type: 'Full-time', location: 'Manila, Philippines', summary: 'Lead exciting projects and help deliver successful solutions to our clients.', description: 'As a Project Manager, you will be responsible for planning, executing, and finalizing projects according to deadlines and within budget.', responsibilities: JSON.stringify([ 'Define project scope, goals, and deliverables', 'Develop full-scale project plans', 'Assemble and coordinate project staff', 'Manage project budget and resource allocation', 'Track project milestones and deliverables' ]), requirements: JSON.stringify([ 'PMP certification preferred', '5+ years of project management experience', 'Experience in IT project management', 'Excellent client-facing and internal communication skills', 'Solid organizational skills including attention to detail' ]), status: 'active', created_at: timestamp, updated_at: timestamp } ], {}); console.log('Job listings seeded successfully'); }, async down (queryInterface, Sequelize) { // Remove all job listings await queryInterface.bulkDelete('job_listings', null, {}); console.log('Job listings removed successfully'); } };