Models
Associations
erDiagram
%% Core entities
COMPANY {
INT id
STR name
STR adress
BOOL is_deleted
}
COMPANY ||--o{ SHIFT : "has"
SHIFT {
INT id
DateTime opening_datetime
DateTime closing_datetime
DECIMAL income
DECIMAL liquids_turnover_without_vat
DECIMAL solids_turnover_without_vat
DECIMAL markup_amount
STR graph_url
JSON raw_remote_data
BOOL is_deleted
}
SHIFT }o--o{ PRODUCT : "sells"
PRODUCT {
INT id
STR third_party_id
INT category_id
INT type_id
STR name
STR type
STR category_name
STR category1
STR category2
STR tax_name
BOOL is_beverage
BOOL is_edible
BOOL is_visible_in_menu
BOOL is_removed_from_menu
BOOL is_deleted
}
COMPANY |o--o{ PRODUCT : "own"
SHIFT |o--o| CONCERT : "host"
CONCERT {
INT id
STR name
STR facebook_url
STR picture_url
JSON raw_remote_data
BOOL is_free
BOOL is_deleted
}
USER }o--o{ COMPANY : "has"
USER {
INT id
STR email
STR password
STR name
BOOL is_super_user
}
Entity relationship

erDiagram
%% Core entities
COMPANY {
INT id
relationship child_shift
relationship child_product
relationship association_Company_User
STR name
STR adress
BOOL is_deleted
}
COMPANY ||--o{ SHIFT : "has"
SHIFT {
INT id
relationship association_Shift_Product
DateTime opening_datetime
DateTime closing_datetime
DECIMAL income
DECIMAL no_tva_liquid
DECIMAL no_tva_solid
DECIMAL markup_amount
STR graph_url
JSON raw_remote_data
BOOL is_deleted
}
SHIFT }o--o{ PRODUCT : "sells"
PRODUCT {
INT id
STR third_party_id
INT category_id
INT type_id
STR name
STR type
STR category_name
STR category1
STR category2
STR tax_name
BOOL is_beverage
BOOL is_edible
BOOL is_visible_in_menu
BOOL is_removed_from_menu
BOOL is_deleted
}
SHIFT ||--|| Shift_Product : "Parent association"
PRODUCT ||--|| Shift_Product : "Child association"
Shift_Product {
INT left_id
INT right_id
relationship shift
relationship product
STR place_send_name
DECIMAL price
}
COMPANY |o--o{ PRODUCT : "own"
SHIFT |o--o| CONCERT : "host"
CONCERT {
INT id
INT shift_id
elationship child_concert
relationship parent_shift
STR name
STR facebook_url
STR picture_url
JSON raw_remote_data
BOOL is_free
BOOL is_deleted
}
CONCERT |o--o{ GENRE : "has"
GENRE {
INT id
STR music_genre
BOOL is_deleted
}
USER }o--o{ COMPANY : "has"
USER {
INT id
STR email
STR password
STR name
BOOL is_super_user
}
COMPANY ||--|| Company_User : "Parent association"
USER ||--|| Company_User : "Child association"
Company_User {
INT left_id
INT right_id
relationship user
relationship company
BOOL is_owner
}