Fritter Backend Data Models
Sunday, October 16, 2022
a
1
minute read
Assignment 5
Categories:
assignment
Fritter abstract data models for my Fritter Backend assignment. To learn more about the API for this project, check out the README.md in the GitHub repository for my backend. The live backend for this application can be found at fritter-backend.61040.camk.co.
- User
- State
- Actions
- Freet
- State
- Actions
-
- State
- Actions
- Briefing [Item, App]
- State
- Actions
- Feed [Item]
- State
- Actions
- Concept Map
User
State
- Username: User → one Username
- Password: User → one Password
- Session: User → lone Session
- Following: User → set Users
- Followers: User → set Users
Actions
- create(u: Username, p: Password): User
- delete(u: User)
- modify(u: Username, p: Password)
- follow(u: User, f: User)
- unfollow(u: User, f: User)
Freet
State
- Author: Freet → one User
- Likes: Freet → set Users
- Replies: Freet → set Freets
- Community: Freet → lone Community
- Content: Freet → one String
Actions
- create(u: User, c: String): Freet
- delete(f: Freet)
- modify(f: Freet, c: String)
- attach(f: Freet, c: Community)
- detach(f: Freet)
State
- Name: Community → one Name
- Members: Community → set Users
- Moderators: Community → set Users
- Banned: Community → set Users
- Content: Community → set Item
Actions
- join(u: User, c: Community)
- leave(u: User, c: Community)
- create(u: User, n: Name): Community
- moderate(m: User, c: Community)
- unmoderate(m: User, c: Community)
- ban(u: User, c: Community)
- unban(u: User, c: Community)
Briefing [Item, App]
State
- Timeframe: Briefing → one Duration
- Content: Briefing → set Item
- LastVisited: App → one Date
Actions
- visit(a: App, d: Date)
- create(c: Set<Content>): Briefing
- modify(b: Briefing, t: Duration)
Feed [Item]
State
- LastRefreshed: Feed → one Date
- Pages: Feed → set Pages
- Content: Page → set Items
- Settings: Feed → one FeedSettings
Actions
- create(c: Content): Feed
- modify(f: Feed, s: FeedSettings)
- changePage(f: Feed, p: Page)
Concept Map