// @generated automatically by Diesel CLI. diesel::table! { address_history (id) { id -> Uuid, address_id -> Uuid, snapshot -> Jsonb, changed_by -> Nullable, changed_at -> Nullable, } } diesel::table! { addresses (id) { id -> Uuid, user_id -> Uuid, #[max_length = 20] address_type -> Nullable, #[max_length = 255] address_line1 -> Varchar, #[max_length = 255] address_line2 -> Nullable, #[max_length = 100] city -> Varchar, #[max_length = 100] state -> Varchar, #[max_length = 20] postal_code -> Varchar, #[max_length = 2] country_code -> Bpchar, #[max_length = 20] phone -> Nullable, is_default_shipping -> Nullable, is_default_billing -> Nullable, created_at -> Nullable, updated_at -> Nullable, is_active -> Nullable, } } diesel::table! { order_items (id) { id -> Uuid, order_id -> Int4, product_id -> Uuid, quantity -> Int4, unit_price -> Numeric, created_at -> Nullable, } } diesel::table! { orders (id) { id -> Int4, customer_id -> Uuid, shipping_address_id -> Nullable, billing_address_id -> Nullable, #[max_length = 20] order_status -> Varchar, total_amount -> Numeric, created_at -> Nullable, } } diesel::table! { payments (id) { id -> Uuid, order_id -> Int4, amount -> Numeric, #[max_length = 50] payment_method -> Varchar, #[max_length = 20] payment_status -> Nullable, #[max_length = 255] transaction_id -> Nullable, created_at -> Nullable, } } diesel::table! { product_categories (id) { id -> Int4, #[max_length = 100] name -> Varchar, parent_category_id -> Nullable, created_at -> Nullable, #[max_length = 255] icon_path -> Nullable, } } diesel::table! { product_images (id) { id -> Uuid, product_id -> Uuid, #[max_length = 255] path -> Varchar, #[max_length = 150] alt_text -> Nullable, is_primary -> Nullable, } } diesel::table! { products (id) { id -> Uuid, #[max_length = 50] sku -> Varchar, #[max_length = 255] name -> Varchar, description -> Nullable, price -> Numeric, stock_quantity -> Int4, created_at -> Nullable, updated_at -> Nullable, category_id -> Int4, } } diesel::table! { users (id) { id -> Uuid, #[max_length = 50] username -> Varchar, username_old -> Nullable, password -> Text, date_created -> Timestamp, date_last_modified -> Nullable, #[max_length = 254] email -> Varchar, email_verified -> Bool, verification_token -> Nullable, reset_token -> Nullable, reset_token_expires -> Nullable, } } diesel::joinable!(address_history -> addresses (address_id)); diesel::joinable!(address_history -> users (changed_by)); diesel::joinable!(addresses -> users (user_id)); diesel::joinable!(order_items -> orders (order_id)); diesel::joinable!(order_items -> products (product_id)); diesel::joinable!(payments -> orders (order_id)); diesel::joinable!(product_images -> products (product_id)); diesel::joinable!(products -> product_categories (category_id)); diesel::allow_tables_to_appear_in_same_query!( address_history, addresses, order_items, orders, payments, product_categories, product_images, products, users, );