Update README.md
This commit is contained in:
parent
0bf685049c
commit
0b0621d7e2
152
README.md
152
README.md
@ -7,155 +7,3 @@
|
|||||||
> - ssh -N -L 3306:127.0.0.1:3306 fsst@fabianschieder.com
|
> - ssh -N -L 3306:127.0.0.1:3306 fsst@fabianschieder.com
|
||||||
|
|
||||||
|
|
||||||
> ## 
|
|
||||||
> 
|
|
||||||
> 
|
|
||||||
|
|
||||||
```sql
|
|
||||||
Table categories {
|
|
||||||
categoryID int [pk]
|
|
||||||
name varchar(255)
|
|
||||||
parentCategoryID int
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "categories"."parentCategoryID" < "categories"."categoryID"
|
|
||||||
|
|
||||||
Table brands {
|
|
||||||
brandID int [pk]
|
|
||||||
name varchar(255)
|
|
||||||
}
|
|
||||||
|
|
||||||
Table products {
|
|
||||||
productID int [pk]
|
|
||||||
categoryID int
|
|
||||||
brandID int
|
|
||||||
model varchar(255)
|
|
||||||
ean varchar(20)
|
|
||||||
description text
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "products"."categoryID" < "categories"."categoryID"
|
|
||||||
Ref: "products"."brandID" < "brands"."brandID"
|
|
||||||
|
|
||||||
Table shops {
|
|
||||||
shopID int [pk]
|
|
||||||
name varchar(255)
|
|
||||||
website varchar(255)
|
|
||||||
}
|
|
||||||
|
|
||||||
Table offers {
|
|
||||||
offerID int [pk]
|
|
||||||
productID int
|
|
||||||
shopID int
|
|
||||||
price decimal(10,2)
|
|
||||||
shippingCost decimal(10,2)
|
|
||||||
inStock boolean
|
|
||||||
productURL varchar(500)
|
|
||||||
lastUpdated timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "offers"."productID" < "products"."productID"
|
|
||||||
Ref: "offers"."shopID" < "shops"."shopID"
|
|
||||||
|
|
||||||
Table attributes {
|
|
||||||
attributeID int [pk]
|
|
||||||
name varchar(255)
|
|
||||||
unit varchar(50)
|
|
||||||
dataType varchar(20)
|
|
||||||
}
|
|
||||||
|
|
||||||
Table categoryAttributes {
|
|
||||||
categoryID int
|
|
||||||
attributeID int
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "categoryAttributes"."categoryID" < "categories"."categoryID"
|
|
||||||
Ref: "categoryAttributes"."attributeID" < "attributes"."attributeID"
|
|
||||||
|
|
||||||
Table productAttributes {
|
|
||||||
productID int
|
|
||||||
attributeID int
|
|
||||||
valueString varchar(255)
|
|
||||||
valueNumber decimal(10,2)
|
|
||||||
valueBool boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "productAttributes"."productID" < "products"."productID"
|
|
||||||
Ref: "productAttributes"."attributeID" < "attributes"."attributeID"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Table users {
|
|
||||||
userID int [pk]
|
|
||||||
email varchar(255)
|
|
||||||
passwordHash varchar(255)
|
|
||||||
displayName varchar(255)
|
|
||||||
isActive boolean
|
|
||||||
createdAt timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
Table roles {
|
|
||||||
roleID int [pk]
|
|
||||||
name varchar(50)
|
|
||||||
}
|
|
||||||
|
|
||||||
Table userRoles {
|
|
||||||
userID int
|
|
||||||
roleID int
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "userRoles"."userID" < "users"."userID"
|
|
||||||
Ref: "userRoles"."roleID" < "roles"."roleID"
|
|
||||||
|
|
||||||
Table userFavorites {
|
|
||||||
userID int
|
|
||||||
productID int
|
|
||||||
createdAt timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "userFavorites"."userID" < "users"."userID"
|
|
||||||
Ref: "userFavorites"."productID" < "products"."productID"
|
|
||||||
|
|
||||||
Table priceAlerts {
|
|
||||||
alertID int [pk]
|
|
||||||
userID int
|
|
||||||
productID int
|
|
||||||
targetPrice decimal(10,2)
|
|
||||||
isActive boolean
|
|
||||||
createdAt timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "priceAlerts"."userID" < "users"."userID"
|
|
||||||
Ref: "priceAlerts"."productID" < "products"."productID"
|
|
||||||
|
|
||||||
Table notifications {
|
|
||||||
notificationID int [pk]
|
|
||||||
userID int
|
|
||||||
title varchar(255)
|
|
||||||
message text
|
|
||||||
isRead boolean
|
|
||||||
createdAt timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "notifications"."userID" < "users"."userID"
|
|
||||||
|
|
||||||
Table reviews {
|
|
||||||
reviewID int [pk]
|
|
||||||
userID int
|
|
||||||
productID int
|
|
||||||
rating int
|
|
||||||
comment text
|
|
||||||
createdAt timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "reviews"."userID" < "users"."userID"
|
|
||||||
Ref: "reviews"."productID" < "products"."productID"
|
|
||||||
|
|
||||||
Table userSessions {
|
|
||||||
sessionID varchar(128) [pk]
|
|
||||||
userID int
|
|
||||||
expiresAt timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref: "userSessions"."userID" < "users"."userID"
|
|
||||||
```
|
|
||||||
Loading…
Reference in New Issue
Block a user