Skip to content

UML Diagram

SADIK KUZU edited this page Jan 1, 2024 · 2 revisions
+-----------------+           +----------------------+
|      User       |           |     Location         |
+-----------------+           +----------------------+
| id: int         |1          | id: int              |
| username: str   |-----------| name: str            |
| email: str      |           | point: PointField    |
| creation_date:  |           | line: LineStringField|
|   DateTimeField |           | polygon: PolygonField|
| biography: str  |           | circle: PointField   |
| profile_photo:  |           | radius: DecimalField |
|   ImageField    |           +----------------------+
| followers: M2M  |
+-----------------+1
          |
          |1
          |
+-----------------+
|   StoryImage    |
+-----------------+
| id: int         |
| image:ImageField|
+-----------------+
              1
              |
              M
+-----------------+
|      Tag        |
+-----------------+
| id: int         |
| name: str       |
| wikidata_id: str|
| description:    |
|   TextField     |
| label: str      |
+-----------------+
          M
          |
          |
+-----------------+           +----------------------+
|     Story       |           |     Comment          |
+-----------------+           +----------------------+
| id: int         |1          | id: int              |
| author: FK(User)|-----------| comment_author: FK   |
| title: str      |           |   User               |
| content:        |           | story: FK(Story)     |
|   RichTextField |           | text: TextField      |
| creation_date:  |           | date: DateTimeField  |
|   DateTimeField |           +----------------------+
| story_tags: M2M |
| location_ids:M2M|
| date_type: str  |
| season_name: str|
| start_year: int |
| end_year: int   |
| decade: int     |
| year: int       |
| date: DateTime  |
| start_date:     |
|   DateTimeField |
| end_date:       |
|   DateTimeField |
| include_time:   |
|   BooleanField  |
| likes: M2M(User)|
+-----------------+
          1
          |
          |
+-----------------+
| PasswordReset   |
|     Token       |
+-----------------+
| user: 1to1 FK   |
| token: str      |
| expires_at:     |
|   DateTimeField |
+-----------------+
              1
              |
              M
+-----------------+
|    Activity     |
+-----------------+
| id: int         |
| user: FK(User)  |
| activity_type:  |
|   str           |
| date: DateTime  |
| target_user:    |
|   FK(User, NU)  |
| target_story:   |
|   FK(Story, NU) |
| viewed: bool    |
+-----------------+
                  1
                  |
                  M
+-----------------+
| StoryRec.       |
| Recommendation  |
+-----------------+
| id: int         |
| story: FK(Story)|
| user: FK(User)  |
| related_stories:|
|   M2M(Story)    |
| location_related|
|   : bool        |
| time_related:   |
|   bool          |
| content_related:|
|   int           |
| tag_related:    |
|   bool          |
| show_count: int |
| has_been_shown: |
|   bool          |
| points: float   |
+-----------------+
Clone this wiki locally