swe574-Fall2024-Group1 / huddleup

Community Specific Information Management project for swe574, Fall 2024 BOUN
0 stars 0 forks source link

Determine Post-Tag Entity Relation #46

Open ustaoglumuharrem opened 3 weeks ago

ustaoglumuharrem commented 3 weeks ago

Post -Tag relation have Many to Many

Models Post model updated to have many-to-many relation with Tag class Post(models.Model): createdBy = models.ForeignKey('authAPI.User', on_delete=models.CASCADE) community = models.ForeignKey('Community', on_delete=models.CASCADE) template = models.ForeignKey('Template', on_delete=models.CASCADE) rowValues = models.JSONField(default=list) createdAt = models.DateTimeField(auto_now_add=True) isEdited = models.BooleanField(default=False) tags = models.ManyToManyField(Tag, related_name='posts') ->Tags can be added to posts

class Tag(models.Model): name = models.CharField(max_length=50, unique=True) description = models.CharField(max_length=200, blank=True)
createdBy = models.ForeignKey('authAPI.User', on_delete=models.CASCADE) createdAt = models.DateTimeField(auto_now_add=True)

aaldaber commented 3 days ago

When registering or when going to own profile, a user can select several tags that are of interest to him.

After that, we can recommend the users relevant communities, or users based on

tag similarity - for first version social score - a count of users that a user is following that follow the same communities

tags number for community min. 1 and max. 5 tags number for posts min.1 and max. 5

When registering, show random 10 popular tags, when adding tags in profile, there needs to be a text input that autocompletes tags or allows to create a new tag