diff --git a/docs/diagrammes/final_erd.dot b/docs/diagrammes/final_erd.dot new file mode 100644 index 0000000..b6f130e --- /dev/null +++ b/docs/diagrammes/final_erd.dot @@ -0,0 +1,1002 @@ +digraph model_graph { + // Dotfile by Django-Extensions graph_models + // Created: 2018-01-29 22:04 + // Cli Options: -a + + fontname = "Helvetica" + fontsize = 8 + splines = true + + node [ + fontname = "Helvetica" + fontsize = 8 + shape = "plaintext" + ] + + edge [ + fontname = "Helvetica" + fontsize = 8 + ] + + // Labels + + + webshop_models_Option [label=< + + + + + + + + + + + + + +
+ + Option +
+ id + + AutoField +
+ description + + CharField +
+ enabled + + BooleanField +
+ name + + CharField +
+ value + + IntegerField +
+ >] + + webshop_models_ArticleStatus [label=< + + + + + + + +
+ + ArticleStatus +
+ id + + AutoField +
+ name + + CharField +
+ >] + + webshop_models_Category [label=< + + + + + + + + + +
+ + Category +
+ id + + AutoField +
+ parent_category + + ForeignKey (id) +
+ name + + CharField +
+ >] + + webshop_models_Article [label=< + + + + + + + + + + + + + + + + + +
+ + Article +
+ id + + AutoField +
+ category + + ForeignKey (id) +
+ status + + ForeignKey (id) +
+ description + + TextField +
+ name + + CharField +
+ price_in_chf + + DecimalField +
+ stock + + FloatField +
+ >] + + webshop_models_OrderStatus [label=< + + + + + + + +
+ + OrderStatus +
+ id + + AutoField +
+ name + + CharField +
+ >] + + webshop_models_OrderOfGoods [label=< + + + + + + + + + + + + + + + +
+ + OrderOfGoods +
+ id + + AutoField +
+ article + + ForeignKey (id) +
+ order_status + + ForeignKey (id) +
+ amount + + FloatField +
+ delivery_date + + DateField +
+ order_date + + DateTimeField +
+ >] + + webshop_models_Picture [label=< + + + + + + + + + + + +
+ + Picture +
+ id + + AutoField +
+ article + + ForeignKey (id) +
+ image + + ImageField +
+ name + + CharField +
+ >] + + webshop_models_Order [label=< + + + + + + + + + + + +
+ + Order +
+ id + + AutoField +
+ status + + ForeignKey (id) +
+ user + + ForeignKey (id) +
+ date + + DateTimeField +
+ >] + + webshop_models_OrderPosition [label=< + + + + + + + + + + + + + +
+ + OrderPosition +
+ id + + AutoField +
+ article + + ForeignKey (id) +
+ order + + ForeignKey (id) +
+ amount + + FloatField +
+ price_in_chf + + DecimalField +
+ >] + + webshop_models_ShoppingCart [label=< + + + + + + + + + +
+ + ShoppingCart +
+ id + + AutoField +
+ user + + ForeignKey (id) +
+ name + + CharField +
+ >] + + webshop_models_City [label=< + + + + + + + + + +
+ + City +
+ id + + AutoField +
+ name + + CharField +
+ zip_code + + PositiveSmallIntegerField +
+ >] + + webshop_models_Salutation [label=< + + + + + + + +
+ + Salutation +
+ id + + AutoField +
+ name + + CharField +
+ >] + + webshop_models_Person [label=< + + + + + + + + + + + + + + + +
+ + Person +
+ id + + AutoField +
+ city + + ForeignKey (id) +
+ salutation + + ForeignKey (id) +
+ user + + OneToOneField (id) +
+ street_name + + CharField +
+ street_number + + CharField +
+ >] + + + + + django_contrib_admin_models_LogEntry [label=< + + + + + + + + + + + + + + + + + + + +
+ + LogEntry +
+ id + + AutoField +
+ content_type + + ForeignKey (id) +
+ user + + ForeignKey (id) +
+ action_flag + + PositiveSmallIntegerField +
+ action_time + + DateTimeField +
+ change_message + + TextField +
+ object_id + + TextField +
+ object_repr + + CharField +
+ >] + + + + + django_contrib_auth_models_AbstractUser [label=< + + + + + + + + + + + + + + + + + + + + + + + +
+ + AbstractUser
<AbstractBaseUser,PermissionsMixin> +
+ date_joined + + DateTimeField +
+ email + + EmailField +
+ first_name + + CharField +
+ is_active + + BooleanField +
+ is_staff + + BooleanField +
+ is_superuser + + BooleanField +
+ last_login + + DateTimeField +
+ last_name + + CharField +
+ password + + CharField +
+ username + + CharField +
+ >] + + django_contrib_auth_models_Permission [label=< + + + + + + + + + + + +
+ + Permission +
+ id + + AutoField +
+ content_type + + ForeignKey (id) +
+ codename + + CharField +
+ name + + CharField +
+ >] + + django_contrib_auth_models_Group [label=< + + + + + + + +
+ + Group +
+ id + + AutoField +
+ name + + CharField +
+ >] + + django_contrib_auth_models_User [label=< + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + User
<AbstractUser> +
+ id + + AutoField +
+ date_joined + + DateTimeField +
+ email + + EmailField +
+ first_name + + CharField +
+ is_active + + BooleanField +
+ is_staff + + BooleanField +
+ is_superuser + + BooleanField +
+ last_login + + DateTimeField +
+ last_name + + CharField +
+ password + + CharField +
+ username + + CharField +
+ >] + + + + + django_contrib_contenttypes_models_ContentType [label=< + + + + + + + + + +
+ + ContentType +
+ id + + AutoField +
+ app_label + + CharField +
+ model + + CharField +
+ >] + + + + + django_contrib_sessions_base_session_AbstractBaseSession [label=< + + + + + + + +
+ + AbstractBaseSession +
+ expire_date + + DateTimeField +
+ session_data + + TextField +
+ >] + + django_contrib_sessions_models_Session [label=< + + + + + + + + + +
+ + Session
<AbstractBaseSession> +
+ session_key + + CharField +
+ expire_date + + DateTimeField +
+ session_data + + TextField +
+ >] + + + + + currencies_models_ExchangeRate_name [label=< + + + + + + + +
+ + ExchangeRate_name +
+ id + + AutoField +
+ name + + CharField +
+ >] + + currencies_models_ExchangeRate_date [label=< + + + + + + + +
+ + ExchangeRate_date +
+ id + + AutoField +
+ date + + DateField +
+ >] + + currencies_models_ExchangeRate [label=< + + + + + + + + + + + +
+ + ExchangeRate +
+ id + + AutoField +
+ date + + ForeignKey (id) +
+ name + + ForeignKey (id) +
+ exchange_rate_to_chf + + DecimalField +
+ >] + + + + + // Relations + + webshop_models_Category -> webshop_models_Category + [label="parent_category (category)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_Article -> webshop_models_Category + [label="category (article)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_Article -> webshop_models_ArticleStatus + [label="status (article)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_OrderOfGoods -> webshop_models_Article + [label="article (orderofgoods)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_OrderOfGoods -> webshop_models_OrderStatus + [label="order_status (orderofgoods)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_Picture -> webshop_models_Article + [label="article (picture)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_Order -> django_contrib_auth_models_User + [label="user (order)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_Order -> webshop_models_OrderStatus + [label="status (order)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_OrderPosition -> webshop_models_Article + [label="article (orderposition)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_OrderPosition -> webshop_models_Order + [label="order (orderposition)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_ShoppingCart -> django_contrib_auth_models_User + [label="user (shoppingcart)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_ShoppingCart -> webshop_models_Article + [label="article (shoppingcart)"] [arrowhead=dot arrowtail=dot, dir=both]; + + webshop_models_Person -> webshop_models_Salutation + [label="salutation (person)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_Person -> webshop_models_City + [label="city (person)"] [arrowhead=none, arrowtail=dot, dir=both]; + + webshop_models_Person -> django_contrib_auth_models_User + [label="user (person)"] [arrowhead=none, arrowtail=none, dir=both]; + + + django_contrib_admin_models_LogEntry -> django_contrib_auth_models_User + [label="user (logentry)"] [arrowhead=none, arrowtail=dot, dir=both]; + + django_contrib_admin_models_LogEntry -> django_contrib_contenttypes_models_ContentType + [label="content_type (logentry)"] [arrowhead=none, arrowtail=dot, dir=both]; + + django_contrib_auth_base_user_AbstractBaseUser [label=< + + +
+ AbstractBaseUser +
+ >] + django_contrib_auth_models_AbstractUser -> django_contrib_auth_base_user_AbstractBaseUser + [label="abstract\ninheritance"] [arrowhead=empty, arrowtail=none, dir=both]; + django_contrib_auth_models_PermissionsMixin [label=< + + +
+ PermissionsMixin +
+ >] + django_contrib_auth_models_AbstractUser -> django_contrib_auth_models_PermissionsMixin + [label="abstract\ninheritance"] [arrowhead=empty, arrowtail=none, dir=both]; + + django_contrib_auth_models_Permission -> django_contrib_contenttypes_models_ContentType + [label="content_type (permission)"] [arrowhead=none, arrowtail=dot, dir=both]; + + django_contrib_auth_models_Group -> django_contrib_auth_models_Permission + [label="permissions (group)"] [arrowhead=dot arrowtail=dot, dir=both]; + + django_contrib_auth_models_User -> django_contrib_auth_models_Group + [label="groups (user)"] [arrowhead=dot arrowtail=dot, dir=both]; + + django_contrib_auth_models_User -> django_contrib_auth_models_Permission + [label="user_permissions (user)"] [arrowhead=dot arrowtail=dot, dir=both]; + + django_contrib_auth_models_User -> django_contrib_auth_models_AbstractUser + [label="abstract\ninheritance"] [arrowhead=empty, arrowtail=none, dir=both]; + + + + django_contrib_sessions_models_Session -> django_contrib_sessions_base_session_AbstractBaseSession + [label="abstract\ninheritance"] [arrowhead=empty, arrowtail=none, dir=both]; + + + currencies_models_ExchangeRate -> currencies_models_ExchangeRate_name + [label="name (exchangerate)"] [arrowhead=none, arrowtail=dot, dir=both]; + + currencies_models_ExchangeRate -> currencies_models_ExchangeRate_date + [label="date (exchangerate)"] [arrowhead=none, arrowtail=dot, dir=both]; + + +} + diff --git a/docs/diagrammes/final_erd.png b/docs/diagrammes/final_erd.png new file mode 100644 index 0000000..73535b5 Binary files /dev/null and b/docs/diagrammes/final_erd.png differ