|
|
@ -24,19 +24,6 @@ create or replace view public.v_cart as
|
|
|
|
left join "cart_item" on "cart".cart_uuid = "cart_item".cart_item_cart_uuid
|
|
|
|
left join "cart_item" on "cart".cart_uuid = "cart_item".cart_item_cart_uuid
|
|
|
|
left join "item" on "cart_item".cart_item_item_uuid = "item".item_uuid;
|
|
|
|
left join "item" on "cart_item".cart_item_item_uuid = "item".item_uuid;
|
|
|
|
|
|
|
|
|
|
|
|
create or replace view public.v_category as
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
"category".*,
|
|
|
|
|
|
|
|
"child_category".category_uuid as child_category_uuid,
|
|
|
|
|
|
|
|
"child_category".category_name as child_category_name,
|
|
|
|
|
|
|
|
"child_category".category_urlslug as child_category_urlslug,
|
|
|
|
|
|
|
|
"item".*
|
|
|
|
|
|
|
|
from "category"
|
|
|
|
|
|
|
|
left join "category_category" on "category".category_uuid = "category_category".category_category_parent_uuid
|
|
|
|
|
|
|
|
left join "category" "child_category" on "category_category".category_category_child_uuid = "child_category".category_uuid
|
|
|
|
|
|
|
|
left join "category_item" on "category".category_uuid = "category_item".category_item_category_uuid
|
|
|
|
|
|
|
|
left join "item" on "category_item".category_item_item_uuid = "item".item_uuid;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create or replace view public.v_item as
|
|
|
|
create or replace view public.v_item as
|
|
|
|
select
|
|
|
|
select
|
|
|
|
"item".*,
|
|
|
|
"item".*,
|
|
|
@ -50,9 +37,14 @@ create or replace view public.v_item as
|
|
|
|
left join "user" on "image".image_uploader_uuid = "user".user_uuid;
|
|
|
|
left join "user" on "image".image_uploader_uuid = "user".user_uuid;
|
|
|
|
|
|
|
|
|
|
|
|
create or replace view public.v_category as
|
|
|
|
create or replace view public.v_category as
|
|
|
|
select
|
|
|
|
select
|
|
|
|
"category".*,
|
|
|
|
"category".*,
|
|
|
|
|
|
|
|
"child_category".category_uuid as child_category_uuid,
|
|
|
|
|
|
|
|
"child_category".category_name as child_category_name,
|
|
|
|
|
|
|
|
"child_category".category_urlslug as child_category_urlslug,
|
|
|
|
v_item.*
|
|
|
|
v_item.*
|
|
|
|
from "category"
|
|
|
|
from "category"
|
|
|
|
left join "category_item" on "category_item".category_item_category_uuid = "category".category_uuid
|
|
|
|
left join "category_category" on "category".category_uuid = "category_category".category_category_parent_uuid
|
|
|
|
left join v_item on "category_item".category_item_item_uuid = item_uuid;
|
|
|
|
left join "category" "child_category" on "category_category".category_category_child_uuid = "child_category".category_uuid
|
|
|
|
|
|
|
|
left join "category_item" on "category".category_uuid = "category_item".category_item_category_uuid
|
|
|
|
|
|
|
|
left join v_item on "category_item".category_item_item_uuid = item_uuid;
|
|
|
|