From 293af4fcc716fba56f26f3490443b6ba3ff2c440 Mon Sep 17 00:00:00 2001 From: Sanmugasundaram K Date: Thu, 8 Jan 2015 12:32:18 +0530 Subject: all tables linked with new website --- spoken_auth/models.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'spoken_auth') diff --git a/spoken_auth/models.py b/spoken_auth/models.py index b315b2d..431330d 100644 --- a/spoken_auth/models.py +++ b/spoken_auth/models.py @@ -12,3 +12,39 @@ class Users(AbstractBaseUser): USERNAME_FIELD = 'username' class Meta: db_table = 'auth_user' + +class FossCategory(models.Model): + foss = models.CharField(unique=True, max_length = 255) + description = models.TextField() + status = models.BooleanField(max_length = 2) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + class Meta: + db_table = 'creation_fosscategory' + +class Language(models.Model): + name = models.CharField(max_length = 255, unique = True) + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + class Meta: + db_table = 'creation_language' + +class TutorialDetails(models.Model): + foss = models.ForeignKey(FossCategory) + tutorial = models.CharField(max_length = 255) + order = models.IntegerField() + created = models.DateTimeField(auto_now_add = True) + updated = models.DateTimeField(auto_now = True) + + class Meta: + db_table = 'creation_tutorialdetail' + +class TutorialResources(models.Model): + id = models.IntegerField(primary_key=True) + tutorial_detail = models.ForeignKey(TutorialDetails) + language = models.ForeignKey(Language) + video = models.TextField() + status = models.PositiveSmallIntegerField(default = 0) + + class Meta: + db_table = 'creation_tutorialresource' -- cgit