Skip to content

Instantly share code, notes, and snippets.

@easherma
Last active October 27, 2016 03:06
Show Gist options
  • Save easherma/a64328bae3381048e203ad766c7e53e2 to your computer and use it in GitHub Desktop.
Save easherma/a64328bae3381048e203ad766c7e53e2 to your computer and use it in GitHub Desktop.
class Story(models.Model):
story_name = models.CharField(max_length=200)
story_description = models.TextField()
story_instructions = models.TextField()
class User(models.Model):
story_id = models.ForeignKey(Story)
user_name = models.CharField(max_length=200)
user_email = models.EmailField(max_length=254)
class Waypoint(models.Model):
geom = models.CharField(max_length=200)
notes = models.TextField()
path_order = models.IntegerField(default=0)
class Submission(models.Model):
story_users_count = models.IntegerField(default=0)
user_id = models.ForeignKey(User)
story_id = models.ForeignKey(Story)
waypoint_id = models.ForeignKey(Waypoint)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment