mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-09-25 00:42:57 +00:00
Updated Folders etc (markdown)
+11
-5
@@ -36,20 +36,18 @@ Author-specific
|
|||||||
- folders should appear before any brew in the user page
|
- folders should appear before any brew in the user page
|
||||||
|
|
||||||
|
|
||||||
A URI/link chould be `/user/:userId/:folder-slug`
|
A URI/link should be `/user/:userId/:folder-slug` or `/user/:userId/:folder-slug/:folder-slug`
|
||||||
|
|
||||||
|
|
||||||
### Data Model
|
### Data Model
|
||||||
|
|
||||||
Folders exist as entities in their own table/collection.
|
Folders exist as entities in their own table/collection.
|
||||||
|
|
||||||
Each folder is owned by one user, and it only appears in the context of _their_ userpage.
|
Each folder is owned by one user, and it only appears in the context of _their_ userpage. It may contain references to brews owned by any user. If the folder `isPublished` then the folder itself per se is visible on the owner's userpage by other users.
|
||||||
It may contain references to brews owned by any user.
|
|
||||||
If the folder `isPublished` then the folder itself per se is visible on the owner's userpage by other users.
|
|
||||||
|
|
||||||
Multiple brews can be assigned to a folder by listing the `brew.shareID` in the folder entity. (This is distinct and different from a model where the association is achieved via an attribute on the brew entity).
|
Multiple brews can be assigned to a folder by listing the `brew.shareID` in the folder entity. (This is distinct and different from a model where the association is achieved via an attribute on the brew entity).
|
||||||
|
|
||||||
Sub-folders are linked via a list of subfolderIds, in the same manner as how brews are linked.
|
Sub-folders are linked via a list of subfolderIds, in the same manner as how brews are linked. The folder graph should not be allowed to form cycles, even though folders may have multiple parents.
|
||||||
|
|
||||||
### Minimal Data structure
|
### Minimal Data structure
|
||||||
- `__Id` (mongo specific ID field, exists wether we create it or not)
|
- `__Id` (mongo specific ID field, exists wether we create it or not)
|
||||||
@@ -117,6 +115,14 @@ Add these to the minimal data structure (above)
|
|||||||
- ~~`brewCount`~~ -- _can/should be calculated on the fly though_
|
- ~~`brewCount`~~ -- _can/should be calculated on the fly though_
|
||||||
- ~~`folderCount`~~ -- _can/should be calculated on the fly though_
|
- ~~`folderCount`~~ -- _can/should be calculated on the fly though_
|
||||||
|
|
||||||
|
### Smart Folders?
|
||||||
|
|
||||||
|
Smart Folders are simply dumb folders with rules attached that show extra brews in the folder (shown, not added or moved).
|
||||||
|
|
||||||
|
They will be ordinary folders with rules layered on later, and their rules will operate only over the owner's brews, not the entire Homebrewery database.
|
||||||
|
|
||||||
|
Smart folders are well out of scope for MVP.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Problem: multiple authors
|
### Problem: multiple authors
|
||||||
|
|||||||
Reference in New Issue
Block a user