mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 23:28:11 +00:00
seed fix: update last station code and correct route reference in seedTrips and seedFareRules functions
This commit is contained in:
@@ -266,7 +266,7 @@ async function seedTrips() {
|
|||||||
|
|
||||||
const route = await prisma.route.findUnique({ where: { code: 'EDR-101' } });
|
const route = await prisma.route.findUnique({ where: { code: 'EDR-101' } });
|
||||||
const firstStation = await prisma.station.findUnique({ where: { code: 'SBT' } });
|
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 coaches = await prisma.coach.findMany();
|
||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
@@ -324,7 +324,7 @@ async function seedTrips() {
|
|||||||
|
|
||||||
async function seedFareRules() {
|
async function seedFareRules() {
|
||||||
console.log('\n💰 Seeding fare rules...');
|
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 seatClasses = await prisma.seatClass.findMany();
|
||||||
const validFrom = new Date('2024-01-01');
|
const validFrom = new Date('2024-01-01');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user