Skip to content

Instantly share code, notes, and snippets.

@hjast
Created March 30, 2012 02:51
Show Gist options
  • Save hjast/2246045 to your computer and use it in GitHub Desktop.
Save hjast/2246045 to your computer and use it in GitHub Desktop.
xxx
object RooseveltIslandScript extends ImportScriptDSL {
import com.sportaneous.dataimport.common.Labels._
import JPAScalaBridge._
override def name = "roosevelt"
override val defaultCapacity = 5
override val defaultPrice = 25
implicit val rooseveltIsland = Facility(
addressLine1 = "552 Main Street",
name = "Roosevelt Island",
city = "New York",
state = "NY",
zip = "10044",
region = Model.find[Region](4l).get,
contactEmail= "[email protected]",
contactName = "Reuben Doetsch",
identifier = "roosevelt"
)
override val org = Organization("Cafe Amrita",name,
rooseveltIsland)
val openSwim = classDescription("Open Swim (All Ages)",
"Open Swim all ages are welcome",
"openSwim",
TopLevelLabel.SWIMMING,
fitness,swimming
)
val adultSwim = classDescription("Open Swim (16 + Older)",
"Open Swim all ages are welcome",
"openSwim",
TopLevelLabel.SWIMMING,
fitness,swimming
)
val islandBootCamp = classDescription("Island Boot Camp",
"Come and get your butt kicked!",
"boot-camp",
TopLevelLabel.HIGH_INTENSITY,
bootcamp,highIntensity
)
val openBasketball = classDescription("Open Basketball",
"Play pickup basketball!",
"basketball",
TopLevelLabel.BASKETBALL,
basketball,fitness
)
//One way to display to change the capacity to 10
activity(openSwim, 10, (6, 0) ->(10, 0), Monday, Tuesday,
Wednesday, Thursday, Friday)
//Another syntax for writing the classes
activity(openSwim,
capacity = 5,
time = (12, 0) ->(15, 0),
Saturday, Sunday
)
activity(adultSwim, (16,0) -> (19,0),Saturday,Sunday)
activity(openSwim, (19,30)->(22,30),Monday,Tuesday,
Wednesday,Thursday,Friday)
activity(islandBootCamp,(19,30)->(20,30),Monday)
activity(openBasketball,(10,0)->(13,0),Saturday)
activity(openBasketball, (14,0)-> (18,0),Saturday)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment