Created
March 30, 2012 02:51
-
-
Save hjast/2246045 to your computer and use it in GitHub Desktop.
xxx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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