binhonglee/GlobeTrotte

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

Summary

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

ts-import { IWingsStruct }:wings-ts-util

ts-implement IWingsStruct

# User - An individual registered user.

struct User {
  id            int   -1
  name          str
  username      str
  email         str
  bio           str
  time_created  date
  trips         []int
  confirmed     bool
}

go-func(
  // GetID (istruct) - Returns the trip ID.
  func (user User) GetID() int {
    return user.ID
  }

  // SetID (istruct) - Sets the trip ID.
  func (user *User) SetID(id int) {
    user.ID = id
  }
)