seed fix: update last station code and correct route reference in seedTrips and seedFareRules functions

This commit is contained in:
Stephanos A
2026-06-09 20:32:24 +03:00
parent 89c29e5e90
commit df75c68bf6

View File

@@ -266,7 +266,7 @@ async function seedTrips() {
const route = await prisma.route.findUnique({ where: { code: 'EDR-101' } });
const firstStation = await prisma.station.findUnique({ where: { code: 'SBT' } });
const lastStation = await prisma.station.findUnique({ where: { code: 'DIR' } });
const lastStation = await prisma.station.findUnique({ where: { code: 'DRE' } });
const coaches = await prisma.coach.findMany();
const now = new Date();
@@ -324,7 +324,7 @@ async function seedTrips() {
async function seedFareRules() {
console.log('\n💰 Seeding fare rules...');
const route = await prisma.route.findUnique({ where: { code: 'EDR-MAIN' } });
const route = await prisma.route.findUnique({ where: { code: 'EDR-101' } });
const seatClasses = await prisma.seatClass.findMany();
const validFrom = new Date('2024-01-01');