ShotByHamadi Logo
Table of Contents

03_DATABASE / D1 Schema Reference

SQL / Edge

D1 Schema Reference

The ShotByHamadi platform utilizes Cloudflare D1 (SQLite) at the edge for ultra-low latency data retrieval. This documentation outlines the core production database schema.

Services

Stores all bookable services displayed on the /services page and managed via the Admin Dashboard.

ColumnTypePrimary KeyDefault / Note
idINTEGER YesAUTOINCREMENT
titleTEXTNo-
descriptionTEXTNo-
priceREALNo-
featuresTEXTNo[] (JSON Array)
categoryTEXTNo-
travel_feeREALNo0
policy_noteTEXTNo-
is_activeINTEGERNo1 (Boolean)

Projects

Stores client project references mapped to R2 buckets, authenticating secure Client Portals.

ColumnTypePrimary KeyDefault / Note
idTEXT YesUUID
project_codeTEXTNoUNIQUE (6-chars)
client_nameTEXTNo-
client_emailTEXTNo-
created_atDATETIMENoCURRENT_TIMESTAMP
folder_pathTEXTNoR2 Prefix String
locationTEXTNo-
project_passwordTEXTNoNULLABLE
base_priceREALNo0
travel_surchargeREALNo0
notesTEXTNoNULLABLE