geeksesi / shop-management

i'ts Quera.org bootcamp's final project from "Dadash kayko Team"
0 stars 0 forks source link

Blog Document #12

Open geeksesi opened 1 year ago

geeksesi commented 1 year ago

Story

we need blog ability, to post news, documents, and etc... about products, shop and our job.

we should be able to make some post, and add the posts to categories ( blog post could have multiple categories )

people could leave comment on posts. ( it's not necessary to login but if they are logged in should be use their name )

posts are contain :

Technical

data models :

anyone with a name and email could make a comment on post, if a user is logged in for a comment should use the logged in email and name.

DOD

resources :

mj999666 commented 1 year ago

We need Category model with One To Many relation. Each Blog can have one category. #17 We need Tag model with Many To Many (Polymorphic) relation. Each Blog can be in 0, 1 or more tags. We need Comment model with One To Many (Polymorphic) relation. Each Blog can get 0, 1 or more comments. ( We need reply ). We need Bookmark model with One To Many (Polymorphic) relation. Each Blog can get 0, 1 or more bookmarks. We need Rate model with One To Many (Polymorphic) relation. Each Blog can get 0, 1 or more rates. For Post model, we need:

sdehgh commented 1 year ago

each category has many posts. each post has many categories or one category?! @geeksesi

sdehgh commented 1 year ago

We need Category model with many To many relation. Each post can have many categories. 

We need Post model with many To many relation. Each category can have many posts. 

We need Comment model with One To Many relation. Each post can get 0, 1 or more comments.

We need User model with One To Many relation. Each User can put 0, 1 or more comments.

We need a table for relation between category &post with many To many relation. Each post can have many categories and Each category can have many posts. For this we need: Id(It's primary key in post model) Id(It's primary key in category model)

For Category model, we need: Title, description,Id

For User model, we need: Author_name, Author_email, password, Username

For Post model, we need: Title, body, thumbnail, SEO description, tags, Id(It's primary key in category model), Id(it's primary key in this table)

For comment model, we need: Id(It's primary key in post model), description, author_name

geeksesi commented 1 year ago

first step :