38570-vm/backend/src/db/seeders/20231127130745-sample-data.js
2026-02-18 15:49:37 +00:00

3544 lines
64 KiB
JavaScript

const db = require('../models');
const Users = db.users;
const SiteSettings = db.site_settings;
const Profiles = db.profiles;
const SocialLinks = db.social_links;
const Skills = db.skills;
const Projects = db.projects;
const ProjectLinks = db.project_links;
const Technologies = db.technologies;
const ProjectTechnologyTags = db.project_technology_tags;
const Animations = db.animations;
const Testimonials = db.testimonials;
const ContactMessages = db.contact_messages;
const AvailabilitySlots = db.availability_slots;
const Bookings = db.bookings;
const SiteSettingsData = [
{
"site_title": "3D Motion Portfolio",
"tagline": "Motion-driven case studies in 3D",
// type code here for "images" field
// type code here for "images" field
"theme_mode": "system",
"primary_color": "#7C3AED",
"seo_description": "A curated selection of 3D and motion projects with detailed case studies and booking.",
"default_og_title": "3D Motion Portfolio",
// type code here for "images" field
// type code here for "relation_one" field
},
{
"site_title": "Avery Chen Studio",
"tagline": "Interactive 3D experiences and motion design",
// type code here for "images" field
// type code here for "images" field
"theme_mode": "light",
"primary_color": "#22C55E",
"seo_description": "Portfolio featuring WebGL, motion UI, and modern Next.js builds.",
"default_og_title": "Avery Chen Studio",
// type code here for "images" field
// type code here for "relation_one" field
},
{
"site_title": "Motion Lab Portfolio",
"tagline": "Experiments in animation and depth",
// type code here for "images" field
// type code here for "images" field
"theme_mode": "system",
"primary_color": "#0EA5E9",
"seo_description": "A portfolio of motion and 3D studies including breakdowns, assets, and demos.",
"default_og_title": "Motion Lab Portfolio",
// type code here for "images" field
// type code here for "relation_one" field
},
];
const ProfilesData = [
{
"headline": "3D Motion Designer and Frontend Engineer",
"bio": "I build interactive 3D experiences for the web using modern motion and rendering libraries.",
"location": "San Francisco, CA",
"timezone": "America/Los_Angeles",
// type code here for "images" field
// type code here for "files" field
"availability_note": "Available for short consulting engagements and select freelance projects.",
// type code here for "relation_one" field
},
{
"headline": "Creative Technologist",
"bio": "Focused on motion systems, performance, and smooth interactions across devices.",
"location": "Austin, TX",
"timezone": "America/Chicago",
// type code here for "images" field
// type code here for "files" field
"availability_note": "Open to collaboration on product launches and demos.",
// type code here for "relation_one" field
},
{
"headline": "Frontend Developer",
"bio": "I translate design into fast, accessible UIs with thoughtful animations.",
"location": "New York, NY",
"timezone": "America/New_York",
// type code here for "images" field
// type code here for "files" field
"availability_note": "Available for part-time contract work.",
// type code here for "relation_one" field
},
];
const SocialLinksData = [
{
"platform": "youtube",
"label": "GitHub",
"url": "https://github.com/averychen",
"sort_order": 1,
"is_visible": true,
// type code here for "relation_one" field
},
{
"platform": "youtube",
"label": "LinkedIn",
"url": "https://www.linkedin.com/in/averychen",
"sort_order": 2,
"is_visible": true,
// type code here for "relation_one" field
},
{
"platform": "artstation",
"label": "Studio Site",
"url": "https://averychen.studio",
"sort_order": 3,
"is_visible": true,
// type code here for "relation_one" field
},
];
const SkillsData = [
{
"name": "Three.js",
"category": "frontend",
"proficiency": 9,
// type code here for "images" field
"is_featured": true,
},
{
"name": "Framer Motion",
"category": "3d",
"proficiency": 9,
// type code here for "images" field
"is_featured": true,
},
{
"name": "Next.js",
"category": "tools",
"proficiency": 9,
// type code here for "images" field
"is_featured": true,
},
];
const ProjectsData = [
{
"title": "Aurora Product Teaser",
"slug": "aurora-product-teaser",
"status": "draft",
"short_summary": "Interactive landing teaser with 3D hero and motion transitions.",
"case_study": "A motion-first teaser page featuring a 3D hero, scroll choreography, and performance budgets.",
// type code here for "images" field
// type code here for "images" field
// type code here for "files" field
"demo_url": "https://demo.motionfolio.com/aurora",
"repository_url": "https://github.com/motionfolio/aurora-teaser",
"start_date": new Date('2025-09-01T00:00:00Z'),
"end_date": new Date('2025-10-15T00:00:00Z'),
"is_featured": true,
"sort_weight": 10.0,
// type code here for "relation_one" field
// type code here for "relation_many" field
},
{
"title": "Orbit Gallery",
"slug": "orbit-gallery",
"status": "draft",
"short_summary": "3D carousel gallery with drag interactions and smooth easing.",
"case_study": "A realtime 3D gallery with inertial dragging, image streaming, and GPU-friendly materials.",
// type code here for "images" field
// type code here for "images" field
// type code here for "files" field
"demo_url": "https://demo.motionfolio.com/orbit",
"repository_url": "https://github.com/motionfolio/orbit-gallery",
"start_date": new Date('2025-06-10T00:00:00Z'),
"end_date": new Date('2025-07-20T00:00:00Z'),
"is_featured": true,
"sort_weight": 9.2,
// type code here for "relation_one" field
// type code here for "relation_many" field
},
{
"title": "Studio Portfolio v2",
"slug": "studio-portfolio-v2",
"status": "draft",
"short_summary": "A refined portfolio with page transitions and modular case studies.",
"case_study": "Rebuilt content structure, added motion system, and optimized media delivery for fast loads.",
// type code here for "images" field
// type code here for "images" field
// type code here for "files" field
"demo_url": "https://demo.motionfolio.com/portfolio-v2",
"repository_url": "https://github.com/motionfolio/portfolio-v2",
"start_date": new Date('2025-02-01T00:00:00Z'),
"end_date": new Date('2025-03-05T00:00:00Z'),
"is_featured": true,
"sort_weight": 7.5,
// type code here for "relation_one" field
// type code here for "relation_many" field
},
];
const ProjectLinksData = [
{
"link_type": "article",
"label": "Live Demo",
"url": "https://demo.motionfolio.com/aurora",
"sort_order": 1,
"is_primary": true,
// type code here for "relation_one" field
},
{
"link_type": "repo",
"label": "Source Code",
"url": "https://github.com/motionfolio/aurora-teaser",
"sort_order": 2,
"is_primary": false,
// type code here for "relation_one" field
},
{
"link_type": "demo",
"label": "Breakdown Video",
"url": "https://vimeo.com/123456789",
"sort_order": 3,
"is_primary": true,
// type code here for "relation_one" field
},
];
const TechnologiesData = [
{
"name": "Next.js",
"type": "service",
"website_url": "https://nextjs.org",
// type code here for "images" field
},
{
"name": "Three.js",
"type": "engine",
"website_url": "https://threejs.org",
// type code here for "images" field
},
{
"name": "Framer Motion",
"type": "library",
"website_url": "https://www.framer.com/motion",
// type code here for "images" field
},
];
const ProjectTechnologyTagsData = [
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"sort_order": 1,
"note": "App router build",
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"sort_order": 2,
"note": "3D hero scene",
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"sort_order": 1,
"note": "Carousel scene graph",
},
];
const AnimationsData = [
{
"name": "Hero Orb Reveal",
"animation_type": "scroll",
"description": "3D orb scales in with subtle parallax and filmic lighting changes.",
// type code here for "files" field
"preview_url": "https://demo.motionfolio.com/previews/hero-orb",
// type code here for "relation_one" field
},
{
"name": "Section Scroll Choreography",
"animation_type": "hover",
"description": "Pinned sections with staggered text reveals and camera easing.",
// type code here for "files" field
"preview_url": "https://demo.motionfolio.com/previews/scroll-choreo",
// type code here for "relation_one" field
},
{
"name": "Inertial Drag Carousel",
"animation_type": "motion",
"description": "Drag to rotate carousel with spring easing and snap points.",
// type code here for "files" field
"preview_url": "https://demo.motionfolio.com/previews/drag-carousel",
// type code here for "relation_one" field
},
];
const TestimonialsData = [
{
"author_name": "Casey Bennett",
"author_title": "Product Lead",
"author_company": "Northwind Labs",
// type code here for "images" field
"quote": "The 3D hero and motion system elevated our launch and stayed performant on mobile.",
"rating": 5.0,
"is_featured": true,
// type code here for "relation_one" field
},
{
"author_name": "Riley Park",
"author_title": "Design Director",
"author_company": "Kite & Co",
// type code here for "images" field
"quote": "Excellent taste in motion and strong attention to detail across the entire experience.",
"rating": 5.0,
"is_featured": true,
// type code here for "relation_one" field
},
{
"author_name": "Jamie Alvarado",
"author_title": "Engineering Manager",
"author_company": "Brightside",
// type code here for "images" field
"quote": "Great communication and clean implementation that our team could maintain.",
"rating": 4.8,
"is_featured": true,
// type code here for "relation_one" field
},
];
const ContactMessagesData = [
{
"name": "Priya Shah",
"email": "priya.shah@northwindlabs.com",
"company": "Northwind Labs",
"budget_range": "$10k-$25k",
"inquiry_type": "collaboration",
"message": "We are planning a product launch page and want a 3D hero with smooth scroll storytelling. Can we talk timelines and scope.",
"status": "replied",
"submitted_at": new Date('2026-02-16T10:05:00Z'),
"source_page": "/contact",
},
{
"name": "Alex Kim",
"email": "alex.kim@kiteandco.com",
"company": "Kite & Co",
"budget_range": "$5k-$10k",
"inquiry_type": "other",
"message": "Interested in collaborating on an interactive concept piece for a client pitch next month.",
"status": "read",
"submitted_at": new Date('2026-02-15T17:30:00Z'),
"source_page": "/contact",
},
{
"name": "Morgan Stone",
"email": "morgan.stone@brightside.com",
"company": "Brightside",
"budget_range": "$25k+",
"inquiry_type": "other",
"message": "We have an opening for a creative frontend engineer. Would you be open to an interview.",
"status": "archived",
"submitted_at": new Date('2026-02-12T14:12:00Z'),
"source_page": "/projects/aurora-product-teaser",
},
];
const AvailabilitySlotsData = [
{
"start_at": new Date('2026-02-20T17:00:00Z'),
"end_at": new Date('2026-02-20T17:30:00Z'),
"status": "open",
"notes": "Intro call slot",
// type code here for "relation_one" field
},
{
"start_at": new Date('2026-02-21T18:00:00Z'),
"end_at": new Date('2026-02-21T18:45:00Z'),
"status": "held",
"notes": "Project consultation slot",
// type code here for "relation_one" field
},
{
"start_at": new Date('2026-02-24T16:00:00Z'),
"end_at": new Date('2026-02-24T16:30:00Z'),
"status": "open",
"notes": "Held for potential client follow up",
// type code here for "relation_one" field
},
];
const BookingsData = [
{
"invitee_name": "Priya Shah",
"invitee_email": "priya.shah@northwindlabs.com",
"invitee_company": "Northwind Labs",
"meeting_type": "intro_call",
"start_at": new Date('2026-02-21T18:00:00Z'),
"end_at": new Date('2026-02-21T18:45:00Z'),
"status": "no_show",
"notes": "Discuss launch page goals and 3D hero scope",
// type code here for "relation_one" field
},
{
"invitee_name": "Alex Kim",
"invitee_email": "alex.kim@kiteandco.com",
"invitee_company": "Kite & Co",
"meeting_type": "interview",
"start_at": new Date('2026-02-20T17:00:00Z'),
"end_at": new Date('2026-02-20T17:30:00Z'),
"status": "completed",
"notes": "Intro and collaboration ideas",
// type code here for "relation_one" field
},
{
"invitee_name": "Morgan Stone",
"invitee_email": "morgan.stone@brightside.com",
"invitee_company": "Brightside",
"meeting_type": "project_consultation",
"start_at": new Date('2026-02-26T20:00:00Z'),
"end_at": new Date('2026-02-26T20:30:00Z'),
"status": "requested",
"notes": "Interview for creative frontend role",
// type code here for "relation_one" field
},
];
// Similar logic for "relation_many"
async function associateSiteSettingWithOwner_user() {
const relatedOwner_user0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SiteSetting0 = await SiteSettings.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (SiteSetting0?.setOwner_user)
{
await
SiteSetting0.
setOwner_user(relatedOwner_user0);
}
const relatedOwner_user1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SiteSetting1 = await SiteSettings.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (SiteSetting1?.setOwner_user)
{
await
SiteSetting1.
setOwner_user(relatedOwner_user1);
}
const relatedOwner_user2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SiteSetting2 = await SiteSettings.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (SiteSetting2?.setOwner_user)
{
await
SiteSetting2.
setOwner_user(relatedOwner_user2);
}
}
async function associateProfileWithUser() {
const relatedUser0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Profile0 = await Profiles.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Profile0?.setUser)
{
await
Profile0.
setUser(relatedUser0);
}
const relatedUser1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Profile1 = await Profiles.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Profile1?.setUser)
{
await
Profile1.
setUser(relatedUser1);
}
const relatedUser2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Profile2 = await Profiles.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Profile2?.setUser)
{
await
Profile2.
setUser(relatedUser2);
}
}
async function associateSocialLinkWithProfile() {
const relatedProfile0 = await Profiles.findOne({
offset: Math.floor(Math.random() * (await Profiles.count())),
});
const SocialLink0 = await SocialLinks.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (SocialLink0?.setProfile)
{
await
SocialLink0.
setProfile(relatedProfile0);
}
const relatedProfile1 = await Profiles.findOne({
offset: Math.floor(Math.random() * (await Profiles.count())),
});
const SocialLink1 = await SocialLinks.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (SocialLink1?.setProfile)
{
await
SocialLink1.
setProfile(relatedProfile1);
}
const relatedProfile2 = await Profiles.findOne({
offset: Math.floor(Math.random() * (await Profiles.count())),
});
const SocialLink2 = await SocialLinks.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (SocialLink2?.setProfile)
{
await
SocialLink2.
setProfile(relatedProfile2);
}
}
async function associateProjectWithAuthor_user() {
const relatedAuthor_user0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Project0 = await Projects.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Project0?.setAuthor_user)
{
await
Project0.
setAuthor_user(relatedAuthor_user0);
}
const relatedAuthor_user1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Project1 = await Projects.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Project1?.setAuthor_user)
{
await
Project1.
setAuthor_user(relatedAuthor_user1);
}
const relatedAuthor_user2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Project2 = await Projects.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Project2?.setAuthor_user)
{
await
Project2.
setAuthor_user(relatedAuthor_user2);
}
}
// Similar logic for "relation_many"
async function associateProjectLinkWithProject() {
const relatedProject0 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const ProjectLink0 = await ProjectLinks.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (ProjectLink0?.setProject)
{
await
ProjectLink0.
setProject(relatedProject0);
}
const relatedProject1 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const ProjectLink1 = await ProjectLinks.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (ProjectLink1?.setProject)
{
await
ProjectLink1.
setProject(relatedProject1);
}
const relatedProject2 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const ProjectLink2 = await ProjectLinks.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (ProjectLink2?.setProject)
{
await
ProjectLink2.
setProject(relatedProject2);
}
}
async function associateProjectTechnologyTagWithProject() {
const relatedProject0 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const ProjectTechnologyTag0 = await ProjectTechnologyTags.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (ProjectTechnologyTag0?.setProject)
{
await
ProjectTechnologyTag0.
setProject(relatedProject0);
}
const relatedProject1 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const ProjectTechnologyTag1 = await ProjectTechnologyTags.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (ProjectTechnologyTag1?.setProject)
{
await
ProjectTechnologyTag1.
setProject(relatedProject1);
}
const relatedProject2 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const ProjectTechnologyTag2 = await ProjectTechnologyTags.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (ProjectTechnologyTag2?.setProject)
{
await
ProjectTechnologyTag2.
setProject(relatedProject2);
}
}
async function associateProjectTechnologyTagWithTechnology() {
const relatedTechnology0 = await Technologies.findOne({
offset: Math.floor(Math.random() * (await Technologies.count())),
});
const ProjectTechnologyTag0 = await ProjectTechnologyTags.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (ProjectTechnologyTag0?.setTechnology)
{
await
ProjectTechnologyTag0.
setTechnology(relatedTechnology0);
}
const relatedTechnology1 = await Technologies.findOne({
offset: Math.floor(Math.random() * (await Technologies.count())),
});
const ProjectTechnologyTag1 = await ProjectTechnologyTags.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (ProjectTechnologyTag1?.setTechnology)
{
await
ProjectTechnologyTag1.
setTechnology(relatedTechnology1);
}
const relatedTechnology2 = await Technologies.findOne({
offset: Math.floor(Math.random() * (await Technologies.count())),
});
const ProjectTechnologyTag2 = await ProjectTechnologyTags.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (ProjectTechnologyTag2?.setTechnology)
{
await
ProjectTechnologyTag2.
setTechnology(relatedTechnology2);
}
}
async function associateAnimationWithProject() {
const relatedProject0 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const Animation0 = await Animations.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Animation0?.setProject)
{
await
Animation0.
setProject(relatedProject0);
}
const relatedProject1 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const Animation1 = await Animations.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Animation1?.setProject)
{
await
Animation1.
setProject(relatedProject1);
}
const relatedProject2 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const Animation2 = await Animations.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Animation2?.setProject)
{
await
Animation2.
setProject(relatedProject2);
}
}
async function associateTestimonialWithProject() {
const relatedProject0 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const Testimonial0 = await Testimonials.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Testimonial0?.setProject)
{
await
Testimonial0.
setProject(relatedProject0);
}
const relatedProject1 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const Testimonial1 = await Testimonials.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Testimonial1?.setProject)
{
await
Testimonial1.
setProject(relatedProject1);
}
const relatedProject2 = await Projects.findOne({
offset: Math.floor(Math.random() * (await Projects.count())),
});
const Testimonial2 = await Testimonials.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Testimonial2?.setProject)
{
await
Testimonial2.
setProject(relatedProject2);
}
}
async function associateAvailabilitySlotWithOwner_user() {
const relatedOwner_user0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const AvailabilitySlot0 = await AvailabilitySlots.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (AvailabilitySlot0?.setOwner_user)
{
await
AvailabilitySlot0.
setOwner_user(relatedOwner_user0);
}
const relatedOwner_user1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const AvailabilitySlot1 = await AvailabilitySlots.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (AvailabilitySlot1?.setOwner_user)
{
await
AvailabilitySlot1.
setOwner_user(relatedOwner_user1);
}
const relatedOwner_user2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const AvailabilitySlot2 = await AvailabilitySlots.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (AvailabilitySlot2?.setOwner_user)
{
await
AvailabilitySlot2.
setOwner_user(relatedOwner_user2);
}
}
async function associateBookingWithAvailability_slot() {
const relatedAvailability_slot0 = await AvailabilitySlots.findOne({
offset: Math.floor(Math.random() * (await AvailabilitySlots.count())),
});
const Booking0 = await Bookings.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Booking0?.setAvailability_slot)
{
await
Booking0.
setAvailability_slot(relatedAvailability_slot0);
}
const relatedAvailability_slot1 = await AvailabilitySlots.findOne({
offset: Math.floor(Math.random() * (await AvailabilitySlots.count())),
});
const Booking1 = await Bookings.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Booking1?.setAvailability_slot)
{
await
Booking1.
setAvailability_slot(relatedAvailability_slot1);
}
const relatedAvailability_slot2 = await AvailabilitySlots.findOne({
offset: Math.floor(Math.random() * (await AvailabilitySlots.count())),
});
const Booking2 = await Bookings.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Booking2?.setAvailability_slot)
{
await
Booking2.
setAvailability_slot(relatedAvailability_slot2);
}
}
module.exports = {
up: async (queryInterface, Sequelize) => {
await SiteSettings.bulkCreate(SiteSettingsData);
await Profiles.bulkCreate(ProfilesData);
await SocialLinks.bulkCreate(SocialLinksData);
await Skills.bulkCreate(SkillsData);
await Projects.bulkCreate(ProjectsData);
await ProjectLinks.bulkCreate(ProjectLinksData);
await Technologies.bulkCreate(TechnologiesData);
await ProjectTechnologyTags.bulkCreate(ProjectTechnologyTagsData);
await Animations.bulkCreate(AnimationsData);
await Testimonials.bulkCreate(TestimonialsData);
await ContactMessages.bulkCreate(ContactMessagesData);
await AvailabilitySlots.bulkCreate(AvailabilitySlotsData);
await Bookings.bulkCreate(BookingsData);
await Promise.all([
// Similar logic for "relation_many"
await associateSiteSettingWithOwner_user(),
await associateProfileWithUser(),
await associateSocialLinkWithProfile(),
await associateProjectWithAuthor_user(),
// Similar logic for "relation_many"
await associateProjectLinkWithProject(),
await associateProjectTechnologyTagWithProject(),
await associateProjectTechnologyTagWithTechnology(),
await associateAnimationWithProject(),
await associateTestimonialWithProject(),
await associateAvailabilitySlotWithOwner_user(),
await associateBookingWithAvailability_slot(),
]);
},
down: async (queryInterface, Sequelize) => {
await queryInterface.bulkDelete('site_settings', null, {});
await queryInterface.bulkDelete('profiles', null, {});
await queryInterface.bulkDelete('social_links', null, {});
await queryInterface.bulkDelete('skills', null, {});
await queryInterface.bulkDelete('projects', null, {});
await queryInterface.bulkDelete('project_links', null, {});
await queryInterface.bulkDelete('technologies', null, {});
await queryInterface.bulkDelete('project_technology_tags', null, {});
await queryInterface.bulkDelete('animations', null, {});
await queryInterface.bulkDelete('testimonials', null, {});
await queryInterface.bulkDelete('contact_messages', null, {});
await queryInterface.bulkDelete('availability_slots', null, {});
await queryInterface.bulkDelete('bookings', null, {});
},
};