<commit_before>from django.db import models

class FacebookUser(models.Model):
    user_id = models.CharField(max_length=255, help_text="The users ID.")
    name = models.CharField(max_length=255, help_text="The users name.") 
    
    def __unicode__(self):
        return self.name

    class Meta:
        app_label = "kral"

#class FacebookComment(models.Model):
#   comment_id = models.CharField(max_length=255, help_text="The comments id.")    
#   from = models.ForeignKey(FacebookUser, help_text="The user who posted this comment.)"
#   message = models.TextField()
#   created_time = models.DateTimeField()


#   def __unicode__(self):
#       return self.message[:20]


class FacebookPost(models.Model):
    #Fields are following the Graph API Post properties.
    likes = models.IntegerField(help_text="Number of likes on this post.", null=True, blank=True)
    post_id = models.CharField(max_length=255, help_text="The Post ID", blank=True)
    from_user = models.ForeignKey(FacebookUser, null=True, blank=True, help_text="Information about the user who posted the message.", related_name="from")
    to_users = models.ManyToManyField(FacebookUser, null=True, blank=True, help_text="Profiles mentioned or targeted in this post.", related_name="to")
    message = models.TextField(help_text="The message.", blank=True)
    picture_link = models.URLField(blank=True, help_text="If available, a link to the picture included with this post.")
    link = models.URLField(blank=True, help_text="The link attached to this post.")
    name = models.CharField(max_length=255, blank=True, help_text="The name of the link.")
    caption = models.CharField(max_length=255, blank=True, help_text="The caption of the link.")
    description = models.TextField(help_text="A description of the link.")
    source = models.URLField(blank=True, help_text="A URL to a Flash movie or video file to be embedded within the post.")
    icon = models.URLField(blank=True, help_text="A link to an icon representing the type of this post.")
    attribution = models.CharField(max_length=255, blank=True, help_text="A string indicating which application was used to create this post.")
    
    #actions NOTE: not sure if this is relevant to store
    #privacy NOTE: same as above
    
    created_time = models.DateTimeField(null=True, blank=True)
    updated_time = models.DateTimeField(null=True, blank=True)
    #targeting NOTE: needs manage_pages permission not sure if this is publically available 

    #connection_likes = models.ManyToManyField(FacebookUser, help_text="The people who liked this post.") 
    #connection_comments = models.ManyToManyField(FacebookComment, help_text="Comments made on this post.)"

    post_type = models.CharField(max_length=255, help_text="Type of post i.e status, video, link, picture")

    def __unicode__(self):
        return self.message[:20]

    class Meta:
        app_label = "kral"


# vim: ai ts=4 sts=4 et sw=4<commit_msg>Added properties fields to models.<commit_after>from django.db import models

class FacebookUser(models.Model):
    user_id = models.CharField(max_length=255, help_text="The users ID.")
    name = models.CharField(max_length=255, help_text="The users name.") 
    
    def __unicode__(self):
        return self.name

    class Meta:
        app_label = "kral"

#class FacebookComment(models.Model):
#   comment_id = models.CharField(max_length=255, help_text="The comments id.")    
#   from = models.ForeignKey(FacebookUser, help_text="The user who posted this comment.)"
#   message = models.TextField()
#   created_time = models.DateTimeField()


#   def __unicode__(self):
#       return self.message[:20]


class FacebookPost(models.Model):
    #Fields are following the Graph API Post properties.
    likes = models.IntegerField(help_text="Number of likes on this post.", null=True, blank=True)
    post_id = models.CharField(max_length=255, help_text="The Post ID", blank=True)
    from_user = models.ForeignKey(FacebookUser, null=True, blank=True, help_text="Information about the user who posted the message.", related_name="from")
    to_users = models.ManyToManyField(FacebookUser, null=True, blank=True, help_text="Profiles mentioned or targeted in this post.", related_name="to")
    message = models.TextField(help_text="The message.", blank=True)
    picture_link = models.URLField(blank=True, help_text="If available, a link to the picture included with this post.")
    link = models.URLField(blank=True, help_text="The link attached to this post.")
    name = models.CharField(max_length=255, blank=True, help_text="The name of the link.")
    caption = models.CharField(max_length=255, blank=True, help_text="The caption of the link.")
    description = models.TextField(help_text="A description of the link.")
    source = models.URLField(blank=True, help_text="A URL to a Flash movie or video file to be embedded within the post.")
    icon = models.URLField(blank=True, help_text="A link to an icon representing the type of this post.")
    attribution = models.CharField(max_length=255, blank=True, help_text="A string indicating which application was used to create this post.")
   
    properties_name = models.CharField(max_length=255, blank=True)
    properties_href = models.URLField(blank=True)
    properties_text = models.TextField(blank=True)

    #actions NOTE: not sure if this is relevant to store
    #privacy NOTE: same as above
    
    created_time = models.DateTimeField(null=True, blank=True)
    updated_time = models.DateTimeField(null=True, blank=True)
    #targeting NOTE: needs manage_pages permission not sure if this is publically available 

    #connection_likes = models.ManyToManyField(FacebookUser, help_text="The people who liked this post.") 
    #connection_comments = models.ManyToManyField(FacebookComment, help_text="Comments made on this post.)"

    post_type = models.CharField(max_length=255, help_text="Type of post i.e status, video, link, picture")

    def __unicode__(self):
        return self.message[:20]

    class Meta:
        app_label = "kral"


# vim: ai ts=4 sts=4 et sw=4
{'fraction_non_alphanumeric': 0.10371339767708163, 'fraction_numerical': 0.010633077048912155, 'mean_word_length': 4.523035230352304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '794959', 'n_tokens_mistral': 1832, 'n_tokens_neox': 1750, 'n_words': 530}