Express and Sequelize (MySQL)
- Make two tables
usersandshopsvia migrations in the database. userstable must containname,email,password(must be hashed),role(ENUM type havingUser,Adminvalues),createdAtandupdatedAtfields.- While
shopstable must containname,description,fk_user_id(foreign key ofuserstable),address,createdAt, andupdatedAtfields. - There should be one to many relationship between
usersandshops.i.e. one user can have multiple shops.