// Directus Database Schema for Mayo // Generated from snapshot(6).json Enum mayo_models_neck_construction { NTB BOLT_ON SET_IN } Enum mayo_parts_part_type { BODY NECK } Enum mayo_parts_finish { GLOSS SATIN MAT NITRO } Table mayo_clients { id integer [primary key] name "character varying" [unique, not null] country "character varying" [not null] } Table mayo_color { id integer [primary key] name "character varying" [unique, not null] } Table mayo_lisst_products { id integer [primary key] user_created uuid date_created timestamp user_updated uuid date_updated timestamp product_id integer [not null] list_id integer [unique, not null] } Table mayo_lists { id integer [primary key] user_created uuid date_created timestamp user_updated uuid date_updated timestamp name "character varying" [unique, not null] description "character varying" } Table mayo_models { id integer [primary key] name "character varying" [unique, not null] neck_construction mayo_models_neck_construction [not null] } Table mayo_operations { id integer [primary key] name "character varying" [unique, not null] description text } Table mayo_order_porducts { id integer [primary key] user_created uuid date_created timestamp user_updated uuid date_updated timestamp product_id integer [unique, not null] order_id integer [not null] order_index integer [not null] } Table mayo_orders { id integer [primary key] user_created uuid date_created timestamp user_updated uuid date_updated timestamp order_number "character varying" [not null] order_year integer [not null] client_id integer [not null] } Table mayo_part_events { id integer [primary key] user_created uuid date_created timestamp user_updated uuid date_updated timestamp part_id integer [not null] ordinal integer [not null] date date [not null] operation_id integer note text } Table mayo_parts { id integer [primary key] part_type mayo_parts_part_type [not null] top_color_id integer [not null] back_color_id integer [not null] top_finish mayo_parts_finish [not null] back_finish mayo_parts_finish [not null] product_id integer [not null] } Table mayo_products { id integer [primary key] user_created uuid date_created timestamp user_updated uuid date_updated timestamp source_url "character varying" specification json model_id integer [not null] } // Relationships Ref: mayo_lisst_products.product_id > mayo_products.id Ref: mayo_lisst_products.list_id > mayo_lists.id Ref: mayo_order_porducts.product_id - mayo_products.id Ref: mayo_order_porducts.order_id > mayo_orders.id Ref: mayo_orders.client_id > mayo_clients.id Ref: mayo_part_events.part_id > mayo_parts.id Ref: mayo_part_events.operation_id > mayo_operations.id Ref: mayo_parts.top_color_id > mayo_color.id Ref: mayo_parts.back_color_id > mayo_color.id Ref: mayo_parts.product_id > mayo_products.id Ref: mayo_products.model_id > mayo_models.id