binhonglee/GlobeTrotte

View on GitHub
src/wings/struct/day.wings

Summary

Maintainability
Test Coverage
go-filepath src/turbine/wings
ts-filepath src/cockpit/wings

import src/wings/struct/place.wings
import src/wings/struct/travel_time.wings
ts-import { IWingsStruct }:wings-ts-util

ts-implement IWingsStruct

# A day of a trip.

struct Day {
  id          int           -1
  trip_id     int
  day_of      int
  places      []Place
  travel_time []TravelTime
}

go-func(
  // GetID (istruct) - Returns the day ID.
  func (day Day) GetID() int {
    return day.ID
  }

  // SetID (istruct) - Sets the day ID.
  func (day *Day) SetID(id int) {
    day.ID = id
  }
)