feat(seeder): add realistic job templates with all new fields

Replace placeholder job data with 10 varied templates covering:
- employment_type (full-time, part-time, contract, dispatch)
- work_mode (remote, hybrid, onsite)
- salary_min/max, salary_type, currency (BRL/USD/EUR/GBP/JPY)
- salary_negotiable, language_level, visa_support
- date_posted, realistic descriptions and locations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tiago Yamamoto 2026-02-22 13:06:32 -06:00
parent 45659f4a76
commit 0876584499

View file

@ -188,26 +188,151 @@ func (s *SeederService) Seed(ctx context.Context, logChan chan string) error {
// 3. Create Jobs
s.SendEvent(logChan, "💼 Creating Jobs...")
jobTitles := []string{"Software Engineer", "Frontend Developer", "Backend Developer", "Product Manager", "UX Designer"}
type jobTemplate struct {
Title string
Description string
EmploymentType string
WorkMode string
Location string
SalaryMin float64
SalaryMax float64
SalaryType string
Currency string
Negotiable bool
LanguageLevel string
VisaSupport bool
Status string
}
jobTemplates := []jobTemplate{
{
Title: "Senior Software Engineer",
Description: "We are looking for a Senior Software Engineer to join our growing engineering team. You will design, build, and maintain efficient, reusable, and reliable Go or TypeScript services. Strong understanding of distributed systems and cloud infrastructure required.",
EmploymentType: "full-time",
WorkMode: "remote",
Location: "Remote — Worldwide",
SalaryMin: 8000, SalaryMax: 14000, SalaryType: "monthly", Currency: "USD",
Negotiable: false, LanguageLevel: "none", VisaSupport: false, Status: "open",
},
{
Title: "Frontend Developer (React / Next.js)",
Description: "Join our product team as a Frontend Developer. You will own the UI layer of our SaaS platform, building responsive and accessible interfaces using React and Next.js. Experience with TypeScript and Tailwind CSS is a plus.",
EmploymentType: "full-time",
WorkMode: "hybrid",
Location: "São Paulo, SP — Brasil",
SalaryMin: 6000, SalaryMax: 10000, SalaryType: "monthly", Currency: "BRL",
Negotiable: false, LanguageLevel: "none", VisaSupport: false, Status: "open",
},
{
Title: "Backend Engineer — Go",
Description: "We need a Backend Engineer experienced in Go to help us scale our API layer. You will work with PostgreSQL, Redis, and gRPC. Clean architecture and test-driven development are core to how we work.",
EmploymentType: "contract",
WorkMode: "remote",
Location: "Remote — Latin America",
SalaryMin: 60, SalaryMax: 90, SalaryType: "hourly", Currency: "USD",
Negotiable: true, LanguageLevel: "none", VisaSupport: false, Status: "open",
},
{
Title: "Product Manager",
Description: "We are hiring a Product Manager to lead our core product squad. You will define the roadmap, work closely with engineering and design, and ensure we ship features that customers love. Prior B2B SaaS experience preferred.",
EmploymentType: "full-time",
WorkMode: "onsite",
Location: "Tokyo, Japan",
SalaryMin: 500000, SalaryMax: 800000, SalaryType: "monthly", Currency: "JPY",
Negotiable: false, LanguageLevel: "N3", VisaSupport: true, Status: "open",
},
{
Title: "UX / Product Designer",
Description: "Looking for a talented UX Designer to shape user experiences across our mobile and web products. You will conduct user research, create wireframes and prototypes, and collaborate with frontend engineers to deliver polished interfaces.",
EmploymentType: "part-time",
WorkMode: "hybrid",
Location: "Berlin, Germany",
SalaryMin: 2500, SalaryMax: 4000, SalaryType: "monthly", Currency: "EUR",
Negotiable: false, LanguageLevel: "none", VisaSupport: true, Status: "open",
},
{
Title: "DevOps / Platform Engineer",
Description: "We are seeking a Platform Engineer to own our cloud infrastructure on AWS. You will manage Kubernetes clusters, CI/CD pipelines, monitoring, and cost optimization. Terraform and Helm experience required.",
EmploymentType: "full-time",
WorkMode: "remote",
Location: "Remote — Europe",
SalaryMin: 70000, SalaryMax: 100000, SalaryType: "yearly", Currency: "GBP",
Negotiable: false, LanguageLevel: "none", VisaSupport: false, Status: "open",
},
{
Title: "Data Analyst",
Description: "Join our data team as a Data Analyst. You will work with large datasets using SQL and Python, build dashboards in Metabase, and support business decisions with clear, actionable insights.",
EmploymentType: "full-time",
WorkMode: "onsite",
Location: "São Paulo, SP — Brasil",
SalaryMin: 5000, SalaryMax: 8000, SalaryType: "monthly", Currency: "BRL",
Negotiable: true, LanguageLevel: "none", VisaSupport: false, Status: "open",
},
{
Title: "Mobile Developer (iOS / Swift)",
Description: "We are looking for an iOS Developer to build and maintain our native iOS app. You will work with Swift, SwiftUI, and REST APIs. Experience publishing apps to the App Store is required.",
EmploymentType: "contract",
WorkMode: "remote",
Location: "Remote — Americas",
SalaryMin: 50, SalaryMax: 80, SalaryType: "hourly", Currency: "USD",
Negotiable: false, LanguageLevel: "none", VisaSupport: false, Status: "open",
},
{
Title: "Dispatch Warehouse Associate",
Description: "We are hiring Dispatch Associates to join our logistics operations team in Tokyo. No prior experience required — full on-the-job training provided. Great opportunity to build a career in supply chain.",
EmploymentType: "dispatch",
WorkMode: "onsite",
Location: "Tokyo, Japan",
SalaryMin: 180000, SalaryMax: 220000, SalaryType: "monthly", Currency: "JPY",
Negotiable: false, LanguageLevel: "N4", VisaSupport: true, Status: "open",
},
{
Title: "QA Engineer",
Description: "We need a QA Engineer to ensure the quality of our web and mobile products. You will write automated tests with Playwright and Cypress, perform exploratory testing, and collaborate with developers to fix bugs fast.",
EmploymentType: "full-time",
WorkMode: "hybrid",
Location: "Remote — Brazil",
SalaryMin: 4500, SalaryMax: 7500, SalaryType: "monthly", Currency: "BRL",
Negotiable: false, LanguageLevel: "none", VisaSupport: false, Status: "open",
},
}
var jobIDs []string
for _, compID := range companyIDs {
// Create 2-3 jobs per company
for i, compID := range companyIDs {
numJobs := rnd.Intn(2) + 2
for i := 0; i < numJobs; i++ {
for j := 0; j < numJobs; j++ {
tmpl := jobTemplates[(i*3+j)%len(jobTemplates)]
jobID := uuid.New().String()
title := jobTitles[rnd.Intn(len(jobTitles))]
_, err := tx.ExecContext(ctx, `
INSERT INTO jobs (id, company_id, title, description, location, type, status, created_at, updated_at)
VALUES ($1, $2, $3, 'This is a great job opportunity.', 'Remote', 'full-time', 'published', NOW(), NOW())
ON CONFLICT DO NOTHING
`, jobID, compID, title)
INSERT INTO jobs (
id, company_id, title, description,
employment_type, work_mode, location,
salary_min, salary_max, salary_type, currency, salary_negotiable,
language_level, visa_support,
status, date_posted, created_at, updated_at
) VALUES (
$1, $2, $3, $4,
$5, $6, $7,
$8, $9, $10, $11, $12,
$13, $14,
$15, NOW(), NOW(), NOW()
) ON CONFLICT DO NOTHING
`,
jobID, compID, tmpl.Title, tmpl.Description,
tmpl.EmploymentType, tmpl.WorkMode, tmpl.Location,
tmpl.SalaryMin, tmpl.SalaryMax, tmpl.SalaryType, tmpl.Currency, tmpl.Negotiable,
tmpl.LanguageLevel, tmpl.VisaSupport,
tmpl.Status,
)
if err != nil {
s.SendEvent(logChan, fmt.Sprintf("❌ Error creating job %s: %v", title, err))
s.SendEvent(logChan, fmt.Sprintf("❌ Error creating job %s: %v", tmpl.Title, err))
continue
}
jobIDs = append(jobIDs, jobID)
s.SendEvent(logChan, fmt.Sprintf(" - Posted Job: %s at %s", title, compID[:8]))
s.SendEvent(logChan, fmt.Sprintf(" - Posted Job: %s (%s/%s) at %s", tmpl.Title, tmpl.EmploymentType, tmpl.WorkMode, compID[:8]))
}
}