Skip to content

Instantly share code, notes, and snippets.

@hjast
Created March 26, 2012 14:13
Show Gist options
  • Save hjast/2205361 to your computer and use it in GitHub Desktop.
Save hjast/2205361 to your computer and use it in GitHub Desktop.
Format
/* Follow this to write other gym import scripts. Import scripts will be faster than a GUI */
object TestOrgScript extends ImportScriptDSL {
import com.sportaneous.dataimport.common.Labels._
import JPAScalaBridge._
override def name = "test-org"
val reubenHouse = Facility(
addressLine1 = "265 W 113th",
name = "Reuben House",
city = "New York",
state = "NY",
zip = "10026",
region = Model.find[Region](4l).get,
contactEmail= "[email protected]",
contactName = "Reuben Doetsch",
identifier = "fac1"
)
val reubenPlace = Facility(
addressLine1 = "45 W 4th Street",
name = "Reuben Office",
city = "New York",
state = "NY",
zip = "10026",
region = Model.find[Region](4l).get,
contactEmail = "[email protected]",
contactName = "Reuben Doetsch",
identifier = "fac2"
)
override val org = Organization("Fourtenth Street Y",
reubenHouse,
reubenPlace)
val reubensClass = classDescription("Reuben's Class",
"IIntense p90x session with R and O",
"p90x",
TopLevelLabel.GROUP_FITNESS,
fitness
)
val anotherClass = classDescription("Sexy time fun",
"60 minutes of sexy time.",
"sexytime",
TopLevelLabel.DANCING,
fitness, ballet, dance
)
atFacility(reubenHouse){ implicit f =>
activity(reubensClass, (12, 0) ->(1, 0), Saturday)
}
atFacility(reubenPlace) { implicit f =>
activity(reubensClass, (12, 0) ->(1, 0), Saturday, Monday, Tuesday)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment