summaryrefslogtreecommitdiffstats
path: root/stackexchange/models.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-03-04 21:47:03 -0500
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-03-04 21:47:03 -0500
commitb807b27c8c3ca1a27c1467ca54885f04ed4d6fa0 (patch)
treedbaab41324014da414d831adad48455b3c26608a /stackexchange/models.py
parent153fe986ea1c25d6c09b89368d71103aa76f0f23 (diff)
downloadaskbot-b807b27c8c3ca1a27c1467ca54885f04ed4d6fa0.tar.gz
askbot-b807b27c8c3ca1a27c1467ca54885f04ed4d6fa0.tar.bz2
askbot-b807b27c8c3ca1a27c1467ca54885f04ed4d6fa0.zip
SE data seems to load into stackexchange tables
Diffstat (limited to 'stackexchange/models.py')
-rw-r--r--stackexchange/models.py502
1 files changed, 264 insertions, 238 deletions
diff --git a/stackexchange/models.py b/stackexchange/models.py
index 28b2dda6..a30a9859 100644
--- a/stackexchange/models.py
+++ b/stackexchange/models.py
@@ -1,240 +1,266 @@
from django.db import models
-class StackExchangeBadge(models.Model):
- class_type = models.IntegerField()
- name = models.CharField(max_length=50)
- description = models.TextField()
- single = models.BooleanField()
- secret = models.BooleanField()
- tag_based = models.BooleanField()
- command = models.TextField()
- award_frequency = models.IntegerField()
-
-class StackExchangeCloseReason(models.Model):
- name = models.CharField(max_length=200)
- description = models.CharField(max_length=256)
- display_order = models.IntegerField()
-
-class StackExchangeComment2Vote(models.Model):
- post_comment = models.ForeignKey('StackExchangePostComment', related_name='StackExchangeComment2Vote_post_comment_set', null=True)
- vote_type = models.ForeignKey('StackExchangeVoteType', related_name='StackExchangeComment2Vote_vote_type_set', null=True)
- creation_date = models.DateTimeField()
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeComment2Vote_user_set', null=True)
- ip_address = models.CharField(max_length=40)
- user_display_name = models.CharField(max_length=40)
- deletion_date = models.DateTimeField()
-
-class StackExchangeFlatPage(models.Model):
- name = models.CharField(max_length=50)
- url = models.CharField(max_length=128)
- value = models.TextField()
- content_type = models.CharField(max_length=50)
- active = models.BooleanField()
- use_master = models.BooleanField()
-
-class StackExchangeMessage(models.Model):
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeMessage_user_set', null=True)
- message_type = models.ForeignKey('StackExchangeMessageType', related_name='StackExchangeMessage_message_type_set', null=True)
- is_read = models.BooleanField()
- creation_date = models.DateTimeField()
- text = models.TextField()
- post = models.ForeignKey('StackExchangePost', related_name='StackExchangeMessage_post_set', null=True)
-
-class StackExchangeMessageType(models.Model):
- name = models.CharField(max_length=50)
- description = models.CharField(max_length=300)
-
-class StackExchangeModeratorMessage(models.Model):
- message_type = models.ForeignKey('StackExchangeMessageType', related_name='StackExchangeModeratorMessage_message_type_set', null=True)
- creation_date = models.DateTimeField()
- creation_ip_address = models.CharField(max_length=40)
- text = models.TextField()
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeModeratorMessage_user_set', null=True)
- post = models.ForeignKey('StackExchangePost', related_name='StackExchangeModeratorMessage_post_set', null=True)
- deletion_date = models.DateTimeField()
- deletion_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeModeratorMessage_deletion_user_set', null=True)
- deletion_ip_address = models.CharField(max_length=40)
- user_display_name = models.CharField(max_length=40)
-
-class StackExchangePostComment(models.Model):
- post = models.ForeignKey('StackExchangePost', related_name='StackExchangePostComment_post_set', null=True)
- text = models.TextField()
- creation_date = models.DateTimeField()
- ip_address = models.CharField(max_length=15)
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePostComment_user_set', null=True)
- user_display_name = models.CharField(max_length=30)
- deletion_date = models.DateTimeField()
- deletion_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePostComment_deletion_user_set', null=True)
- score = models.IntegerField()
-
-class StackExchangePostHistoryType(models.Model):
- name = models.CharField(max_length=50)
- description = models.CharField(max_length=300)
-
-class StackExchangePostHistory(models.Model):
- post_history_type = models.ForeignKey('StackExchangePostHistoryType', related_name='StackExchangePostHistory_post_history_type_set', null=True)
- post = models.ForeignKey('StackExchangePost', related_name='StackExchangePostHistory_post_set', null=True)
- revision_guid = models.CharField(max_length=64)
- creation_date = models.DateTimeField()
- ip_address = models.CharField(max_length=40)
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePostHistory_user_set', null=True)
- comment = models.CharField(max_length=400)
- text = models.TextField()
- user_display_name = models.CharField(max_length=40)
- user_email = models.CharField(max_length=100)
- user_website_url = models.CharField(max_length=200)
-
-class StackExchangePost2Vote(models.Model):
- post = models.ForeignKey('StackExchangePost', related_name='StackExchangePost2Vote_post_set', null=True)
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePost2Vote_user_set', null=True)
- vote_type = models.ForeignKey('StackExchangeVoteType', related_name='StackExchangePost2Vote_vote_type_set', null=True)
- creation_date = models.DateTimeField()
- deletion_date = models.DateTimeField()
- target_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePost2Vote_target_user_set', null=True)
- target_rep_change = models.IntegerField()
- voter_rep_change = models.IntegerField()
- comment = models.CharField(max_length=150)
- ip_address = models.CharField(max_length=40)
- linked_post = models.ForeignKey('StackExchangePost', related_name='StackExchangePost2Vote_linked_post_set', null=True)
-
-class StackExchangePost(models.Model):
- post_type = models.ForeignKey('StackExchangePostType', related_name='StackExchangePost_post_type_set', null=True)
- creation_date = models.DateTimeField()
- score = models.IntegerField()
- view_count = models.IntegerField()
- body = models.TextField()
- owner_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePost_owner_user_set', null=True)
- last_editor_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePost_last_editor_user_set', null=True)
- last_edit_date = models.DateTimeField()
- last_activity_date = models.DateTimeField()
- last_activity_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangePost_last_activity_user_set', null=True)
- parent = models.ForeignKey('self', related_name='StackExchangePost_parent_set', null=True)
- accepted_answer = models.ForeignKey('self', related_name='StackExchangePost_accepted_answer_set', null=True)
- title = models.CharField(max_length=250)
- tags = models.CharField(max_length=150)
- community_owned_date = models.DateTimeField()
- history_summary = models.CharField(max_length=150)
- answer_score = models.IntegerField()
- answer_count = models.IntegerField()
- comment_count = models.IntegerField()
- favorite_count = models.IntegerField()
- deletion_date = models.DateTimeField()
- closed_date = models.DateTimeField()
- locked_date = models.DateTimeField()
- locked_duration = models.IntegerField()
- owner_display_name = models.CharField(max_length=40)
- last_editor_display_name = models.CharField(max_length=40)
- bounty_amount = models.IntegerField()
- bounty_closes = models.DateTimeField()
- bounty_closed = models.DateTimeField()
- last_owner_email_date = models.DateTimeField()
-
-class StackExchangePostType(models.Model):
- name = models.CharField(max_length=50)
- description = models.CharField(max_length=300)
-
-class StackExchangeSchemaVersion(models.Model):
- version = models.IntegerField()
-
-class StackExchangeSetting(models.Model):
- key = models.CharField(max_length=256)
- value = models.TextField()
-
-class StackExchangeSystemMessage(models.Model):
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeSystemMessage_user_set', null=True)
- creation_date = models.DateTimeField()
- text = models.TextField()
- deletion_date = models.DateTimeField()
- deletion_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeSystemMessage_deletion_user_set', null=True)
-
-class StackExchangeTag(models.Model):
- name = models.CharField(max_length=50)
- count = models.IntegerField()
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeTag_user_set', null=True)
- creation_date = models.DateTimeField()
- is_moderator_only = models.BooleanField()
- is_required = models.BooleanField()
- aliases = models.CharField(max_length=200)
-
-class StackExchangeThemeResource(models.Model):
- name = models.CharField(max_length=50)
- value = models.TextField()
- content_type = models.CharField(max_length=50)
- version = models.CharField(max_length=6)
-
-class StackExchangeThemeTextResource(models.Model):
- name = models.CharField(max_length=50)
- value = models.TextField()
- content_type = models.CharField(max_length=50)
-
-class StackExchangeThrottleBucket(models.Model):
- type = models.CharField(max_length=256)
- ip_address = models.CharField(max_length=64)
- tokens = models.IntegerField()
- last_update = models.DateTimeField()
-
-class StackExchangeUserHistoryType(models.Model):
- name = models.CharField(max_length=50)
- description = models.CharField(max_length=300)
-
-class StackExchangeUserHistory(models.Model):
- user_history_type = models.ForeignKey('StackExchangeUserHistoryType', related_name='StackExchangeUserHistory_user_history_type_set', null=True)
- creation_date = models.DateTimeField()
- ip_address = models.CharField(max_length=40)
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeUserHistory_user_set', null=True)
- comment = models.CharField(max_length=400)
- user_display_name = models.CharField(max_length=40)
- moderator_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeUserHistory_moderator_user_set', null=True)
- reputation = models.IntegerField()
-
-class StackExchangeUser2Badge(models.Model):
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeUser2Badge_user_set', null=True)
- badge = models.ForeignKey('StackExchangeBadge', related_name='StackExchangeUser2Badge_badge_set', null=True)
- date = models.DateTimeField()
- comment = models.CharField(max_length=50)
-
-class StackExchangeUser2Vote(models.Model):
- user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeUser2Vote_user_set', null=True)
- vote_type = models.ForeignKey('StackExchangeVoteType', related_name='StackExchangeUser2Vote_vote_type_set', null=True)
- target_user = models.ForeignKey('StackExchangeUser', related_name='StackExchangeUser2Vote_target_user_set', null=True)
- creation_date = models.DateTimeField()
- deletion_date = models.DateTimeField()
- ip_address = models.CharField(max_length=40)
-
-class StackExchangeUser(models.Model):
- user_type = models.ForeignKey('StackExchangeUserType', related_name='StackExchangeUser_user_type_set', null=True)
- open_id = models.CharField(max_length=200)
- reputation = models.IntegerField()
- views = models.IntegerField()
- creation_date = models.DateTimeField()
- last_access_date = models.DateTimeField()
- has_replies = models.BooleanField()
- has_message = models.BooleanField()
- opt_in_email = models.BooleanField()
- opt_in_recruit = models.BooleanField()
- last_login_date = models.DateTimeField()
- last_email_date = models.DateTimeField()
- last_login_ip = models.CharField(max_length=15)
- open_id_alt = models.CharField(max_length=200)
- email = models.CharField(max_length=100)
- display_name = models.CharField(max_length=40)
- display_name_cleaned = models.CharField(max_length=40)
- website_url = models.CharField(max_length=200)
- real_name = models.CharField(max_length=100)
- location = models.CharField(max_length=100)
- birthday = models.DateTimeField()
- badge_summary = models.CharField(max_length=50)
- about_me = models.TextField()
- preferences_raw = models.TextField()
- timed_penalty_date = models.DateTimeField()
- guid = models.CharField(max_length=64)
- phone = models.CharField(max_length=20)
- password_id = models.IntegerField()
-
-class StackExchangeUserType(models.Model):
- name = models.CharField(max_length=50)
- description = models.CharField(max_length=300)
-
-class StackExchangeVoteType(models.Model):
- name = models.CharField(max_length=50)
- description = models.CharField(max_length=300)
+class Badge(models.Model):
+ id = models.IntegerField(primary_key=True)
+ class_type = models.IntegerField(null=True)
+ name = models.CharField(max_length=50, null=True)
+ description = models.TextField(null=True)
+ single = models.NullBooleanField(null=True)
+ secret = models.NullBooleanField(null=True)
+ tag_based = models.NullBooleanField(null=True)
+ command = models.TextField(null=True)
+ award_frequency = models.IntegerField(null=True)
+
+class CloseReason(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=200, null=True)
+ description = models.CharField(max_length=256, null=True)
+ display_order = models.IntegerField(null=True)
+
+class Comment2Vote(models.Model):
+ id = models.IntegerField(primary_key=True)
+ post_comment = models.ForeignKey('PostComment', related_name='Comment2Vote_by_post_comment_set', null=True)
+ vote_type = models.ForeignKey('VoteType', related_name='Comment2Vote_by_vote_type_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ user = models.ForeignKey('User', related_name='Comment2Vote_by_user_set', null=True)
+ ip_address = models.CharField(max_length=40, null=True)
+ user_display_name = models.CharField(max_length=40, null=True)
+ deletion_date = models.DateTimeField(null=True)
+
+class FlatPage(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ url = models.CharField(max_length=128, null=True)
+ value = models.TextField(null=True)
+ content_type = models.CharField(max_length=50, null=True)
+ active = models.NullBooleanField(null=True)
+ use_master = models.NullBooleanField(null=True)
+
+class Message(models.Model):
+ id = models.IntegerField(primary_key=True)
+ user = models.ForeignKey('User', related_name='Message_by_user_set', null=True)
+ message_type = models.ForeignKey('MessageType', related_name='Message_by_message_type_set', null=True)
+ is_read = models.NullBooleanField(null=True)
+ creation_date = models.DateTimeField(null=True)
+ text = models.TextField(null=True)
+ post = models.ForeignKey('Post', related_name='Message_by_post_set', null=True)
+
+class MessageType(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ description = models.CharField(max_length=300, null=True)
+
+class ModeratorMessage(models.Model):
+ id = models.IntegerField(primary_key=True)
+ message_type = models.ForeignKey('MessageType', related_name='ModeratorMessage_by_message_type_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ creation_ip_address = models.CharField(max_length=40, null=True)
+ text = models.TextField(null=True)
+ user = models.ForeignKey('User', related_name='ModeratorMessage_by_user_set', null=True)
+ post = models.ForeignKey('Post', related_name='ModeratorMessage_by_post_set', null=True)
+ deletion_date = models.DateTimeField(null=True)
+ deletion_user = models.ForeignKey('User', related_name='ModeratorMessage_by_deletion_user_set', null=True)
+ deletion_ip_address = models.CharField(max_length=40, null=True)
+ user_display_name = models.CharField(max_length=40, null=True)
+
+class PostComment(models.Model):
+ id = models.IntegerField(primary_key=True)
+ post = models.ForeignKey('Post', related_name='PostComment_by_post_set', null=True)
+ text = models.TextField(null=True)
+ creation_date = models.DateTimeField(null=True)
+ ip_address = models.CharField(max_length=15, null=True)
+ user = models.ForeignKey('User', related_name='PostComment_by_user_set', null=True)
+ user_display_name = models.CharField(max_length=30, null=True)
+ deletion_date = models.DateTimeField(null=True)
+ deletion_user = models.ForeignKey('User', related_name='PostComment_by_deletion_user_set', null=True)
+ score = models.IntegerField(null=True)
+
+class PostHistoryType(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ description = models.CharField(max_length=300, null=True)
+
+class PostHistory(models.Model):
+ id = models.IntegerField(primary_key=True)
+ post_history_type = models.ForeignKey('PostHistoryType', related_name='PostHistory_by_post_history_type_set', null=True)
+ post = models.ForeignKey('Post', related_name='PostHistory_by_post_set', null=True)
+ revision_guid = models.CharField(max_length=64, null=True)
+ creation_date = models.DateTimeField(null=True)
+ ip_address = models.CharField(max_length=40, null=True)
+ user = models.ForeignKey('User', related_name='PostHistory_by_user_set', null=True)
+ comment = models.CharField(max_length=400, null=True)
+ text = models.TextField(null=True)
+ user_display_name = models.CharField(max_length=40, null=True)
+ user_email = models.CharField(max_length=100, null=True)
+ user_website_url = models.CharField(max_length=200, null=True)
+
+class Post2Vote(models.Model):
+ id = models.IntegerField(primary_key=True)
+ post = models.ForeignKey('Post', related_name='Post2Vote_by_post_set', null=True)
+ user = models.ForeignKey('User', related_name='Post2Vote_by_user_set', null=True)
+ vote_type = models.ForeignKey('VoteType', related_name='Post2Vote_by_vote_type_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ deletion_date = models.DateTimeField(null=True)
+ target_user = models.ForeignKey('User', related_name='Post2Vote_by_target_user_set', null=True)
+ target_rep_change = models.IntegerField(null=True)
+ voter_rep_change = models.IntegerField(null=True)
+ comment = models.CharField(max_length=150, null=True)
+ ip_address = models.CharField(max_length=40, null=True)
+ linked_post = models.ForeignKey('Post', related_name='Post2Vote_by_linked_post_set', null=True)
+
+class Post(models.Model):
+ id = models.IntegerField(primary_key=True)
+ post_type = models.ForeignKey('PostType', related_name='Post_by_post_type_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ score = models.IntegerField(null=True)
+ view_count = models.IntegerField(null=True)
+ body = models.TextField(null=True)
+ owner_user = models.ForeignKey('User', related_name='Post_by_owner_user_set', null=True)
+ last_editor_user = models.ForeignKey('User', related_name='Post_by_last_editor_user_set', null=True)
+ last_edit_date = models.DateTimeField(null=True)
+ last_activity_date = models.DateTimeField(null=True)
+ last_activity_user = models.ForeignKey('User', related_name='Post_by_last_activity_user_set', null=True)
+ parent = models.ForeignKey('self', related_name='Post_by_parent_set', null=True)
+ accepted_answer = models.ForeignKey('self', related_name='Post_by_accepted_answer_set', null=True)
+ title = models.CharField(max_length=250, null=True)
+ tags = models.CharField(max_length=150, null=True)
+ community_owned_date = models.DateTimeField(null=True)
+ history_summary = models.CharField(max_length=150, null=True)
+ answer_score = models.IntegerField(null=True)
+ answer_count = models.IntegerField(null=True)
+ comment_count = models.IntegerField(null=True)
+ favorite_count = models.IntegerField(null=True)
+ deletion_date = models.DateTimeField(null=True)
+ closed_date = models.DateTimeField(null=True)
+ locked_date = models.DateTimeField(null=True)
+ locked_duration = models.IntegerField(null=True)
+ owner_display_name = models.CharField(max_length=40, null=True)
+ last_editor_display_name = models.CharField(max_length=40, null=True)
+ bounty_amount = models.IntegerField(null=True)
+ bounty_closes = models.DateTimeField(null=True)
+ bounty_closed = models.DateTimeField(null=True)
+ last_owner_email_date = models.DateTimeField(null=True)
+
+class PostType(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ description = models.CharField(max_length=300, null=True)
+
+class SchemaVersion(models.Model):
+ version = models.IntegerField(null=True)
+
+class Setting(models.Model):
+ id = models.IntegerField(primary_key=True)
+ key = models.CharField(max_length=256, null=True)
+ value = models.TextField(null=True)
+
+class SystemMessage(models.Model):
+ id = models.IntegerField(primary_key=True)
+ user = models.ForeignKey('User', related_name='SystemMessage_by_user_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ text = models.TextField(null=True)
+ deletion_date = models.DateTimeField(null=True)
+ deletion_user = models.ForeignKey('User', related_name='SystemMessage_by_deletion_user_set', null=True)
+
+class Tag(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ count = models.IntegerField(null=True)
+ user = models.ForeignKey('User', related_name='Tag_by_user_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ is_moderator_only = models.NullBooleanField(null=True)
+ is_required = models.NullBooleanField(null=True)
+ aliases = models.CharField(max_length=200, null=True)
+
+class ThemeResource(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ value = models.TextField(null=True)
+ content_type = models.CharField(max_length=50, null=True)
+ version = models.CharField(max_length=6, null=True)
+
+class ThemeTextResource(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ value = models.TextField(null=True)
+ content_type = models.CharField(max_length=50, null=True)
+
+class ThrottleBucket(models.Model):
+ id = models.IntegerField(primary_key=True)
+ type = models.CharField(max_length=256, null=True)
+ ip_address = models.CharField(max_length=64, null=True)
+ tokens = models.IntegerField(null=True)
+ last_update = models.DateTimeField(null=True)
+
+class UserHistoryType(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ description = models.CharField(max_length=300, null=True)
+
+class UserHistory(models.Model):
+ id = models.IntegerField(primary_key=True)
+ user_history_type = models.ForeignKey('UserHistoryType', related_name='UserHistory_by_user_history_type_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ ip_address = models.CharField(max_length=40, null=True)
+ user = models.ForeignKey('User', related_name='UserHistory_by_user_set', null=True)
+ comment = models.CharField(max_length=400, null=True)
+ user_display_name = models.CharField(max_length=40, null=True)
+ moderator_user = models.ForeignKey('User', related_name='UserHistory_by_moderator_user_set', null=True)
+ reputation = models.IntegerField(null=True)
+
+class User2Badge(models.Model):
+ id = models.IntegerField(primary_key=True)
+ user = models.ForeignKey('User', related_name='User2Badge_by_user_set', null=True)
+ badge = models.ForeignKey('Badge', related_name='User2Badge_by_badge_set', null=True)
+ date = models.DateTimeField(null=True)
+ comment = models.CharField(max_length=50, null=True)
+
+class User2Vote(models.Model):
+ id = models.IntegerField(primary_key=True)
+ user = models.ForeignKey('User', related_name='User2Vote_by_user_set', null=True)
+ vote_type = models.ForeignKey('VoteType', related_name='User2Vote_by_vote_type_set', null=True)
+ target_user = models.ForeignKey('User', related_name='User2Vote_by_target_user_set', null=True)
+ creation_date = models.DateTimeField(null=True)
+ deletion_date = models.DateTimeField(null=True)
+ ip_address = models.CharField(max_length=40, null=True)
+
+class User(models.Model):
+ id = models.IntegerField(primary_key=True)
+ user_type = models.ForeignKey('UserType', related_name='User_by_user_type_set', null=True)
+ open_id = models.CharField(max_length=200, null=True)
+ reputation = models.IntegerField(null=True)
+ views = models.IntegerField(null=True)
+ creation_date = models.DateTimeField(null=True)
+ last_access_date = models.DateTimeField(null=True)
+ has_replies = models.NullBooleanField(null=True)
+ has_message = models.NullBooleanField(null=True)
+ opt_in_email = models.NullBooleanField(null=True)
+ opt_in_recruit = models.NullBooleanField(null=True)
+ last_login_date = models.DateTimeField(null=True)
+ last_email_date = models.DateTimeField(null=True)
+ last_login_ip = models.CharField(max_length=15, null=True)
+ open_id_alt = models.CharField(max_length=200, null=True)
+ email = models.CharField(max_length=100, null=True)
+ display_name = models.CharField(max_length=40, null=True)
+ display_name_cleaned = models.CharField(max_length=40, null=True)
+ website_url = models.CharField(max_length=200, null=True)
+ real_name = models.CharField(max_length=100, null=True)
+ location = models.CharField(max_length=100, null=True)
+ birthday = models.DateTimeField(null=True)
+ badge_summary = models.CharField(max_length=50, null=True)
+ about_me = models.TextField(null=True)
+ preferences_raw = models.TextField(null=True)
+ timed_penalty_date = models.DateTimeField(null=True)
+ guid = models.CharField(max_length=64, null=True)
+ phone = models.CharField(max_length=20, null=True)
+ password_id = models.IntegerField(null=True)
+
+class UserType(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ description = models.CharField(max_length=300, null=True)
+
+class VoteType(models.Model):
+ id = models.IntegerField(primary_key=True)
+ name = models.CharField(max_length=50, null=True)
+ description = models.CharField(max_length=300, null=True)