mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 06:37:33 +00:00
fix(roadtrip): keep the stay on each visit, not on the place (#3092)
A nullable day_assignments.stay_minutes holds the stay of one visit; a visit without one keeps reading the place's duration, so existing trips drive as before. REST PUT /trips/:tripId/assignments/:id/stay and the MCP tool set_assignment_stay write it with day_edit.
This commit is contained in:
@@ -31,6 +31,7 @@ export class DayAssignments {
|
||||
accommodation_id?: number | null;
|
||||
route_excluded: number & Opt = 0;
|
||||
tour_stage_key?: string | null;
|
||||
stay_minutes?: number | null;
|
||||
assignment_participants_collection = new Collection<AssignmentParticipants>(this);
|
||||
file_links_collection = new Collection<FileLinks>(this);
|
||||
reservations_collection = new Collection<Reservations>(this);
|
||||
@@ -70,6 +71,7 @@ export const DayAssignmentsSchema = defineEntity({
|
||||
accommodation_id: p.integer().nullable().index('idx_day_assignments_accommodation_id'),
|
||||
route_excluded: p.integer().default(0),
|
||||
tour_stage_key: p.text().nullable(),
|
||||
stay_minutes: p.integer().nullable(),
|
||||
assignment_participants_collection: () => p.oneToMany(AssignmentParticipants).mappedBy('assignment').hidden(),
|
||||
file_links_collection: () => p.oneToMany(FileLinks).mappedBy('assignment').hidden(),
|
||||
reservations_collection: () => p.oneToMany(Reservations).mappedBy('assignment').hidden(),
|
||||
|
||||
Reference in New Issue
Block a user