@hed-hog/catalog 0.0.293 → 0.0.295
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +391 -361
- package/dist/catalog-resource.config.d.ts.map +1 -1
- package/dist/catalog-resource.config.js +51 -24
- package/dist/catalog-resource.config.js.map +1 -1
- package/dist/catalog.controller.d.ts +420 -0
- package/dist/catalog.controller.d.ts.map +1 -1
- package/dist/catalog.controller.js +98 -0
- package/dist/catalog.controller.js.map +1 -1
- package/dist/catalog.module.d.ts.map +1 -1
- package/dist/catalog.module.js +5 -1
- package/dist/catalog.module.js.map +1 -1
- package/dist/catalog.service.d.ts +216 -1
- package/dist/catalog.service.d.ts.map +1 -1
- package/dist/catalog.service.js +1121 -7
- package/dist/catalog.service.js.map +1 -1
- package/hedhog/data/catalog_attribute.yaml +202 -0
- package/hedhog/data/catalog_attribute_option.yaml +109 -0
- package/hedhog/data/catalog_category.yaml +47 -0
- package/hedhog/data/catalog_category_attribute.yaml +209 -0
- package/hedhog/data/menu.yaml +46 -12
- package/hedhog/data/role.yaml +7 -7
- package/hedhog/data/route.yaml +64 -0
- package/hedhog/frontend/app/[resource]/page.tsx.ejs +358 -0
- package/hedhog/frontend/app/_components/catalog-ai-form-assist-dialog.tsx.ejs +340 -0
- package/hedhog/frontend/app/_components/catalog-resource-form-sheet.tsx.ejs +815 -0
- package/hedhog/frontend/app/_lib/catalog-resources.tsx.ejs +504 -736
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +14 -83
- package/hedhog/frontend/messages/en.json +150 -60
- package/hedhog/frontend/messages/pt.json +185 -95
- package/hedhog/table/catalog_affiliate_program.yaml +41 -41
- package/hedhog/table/catalog_attribute.yaml +22 -7
- package/hedhog/table/catalog_attribute_group.yaml +18 -18
- package/hedhog/table/catalog_attribute_option.yaml +40 -0
- package/hedhog/table/catalog_brand.yaml +34 -34
- package/hedhog/table/catalog_category.yaml +40 -0
- package/hedhog/table/catalog_category_attribute.yaml +13 -7
- package/hedhog/table/catalog_click_event.yaml +50 -50
- package/hedhog/table/catalog_comparison.yaml +3 -6
- package/hedhog/table/catalog_comparison_highlight.yaml +39 -39
- package/hedhog/table/catalog_comparison_item.yaml +30 -30
- package/hedhog/table/catalog_content_relation.yaml +42 -42
- package/hedhog/table/catalog_import_run.yaml +33 -33
- package/hedhog/table/catalog_import_source.yaml +24 -24
- package/hedhog/table/catalog_merchant.yaml +29 -29
- package/hedhog/table/catalog_offer.yaml +83 -83
- package/hedhog/table/catalog_price_history.yaml +34 -34
- package/hedhog/table/catalog_product.yaml +5 -3
- package/hedhog/table/catalog_product_attribute_value.yaml +15 -2
- package/hedhog/table/catalog_product_category.yaml +3 -3
- package/hedhog/table/catalog_product_image.yaml +34 -34
- package/hedhog/table/catalog_product_score.yaml +38 -38
- package/hedhog/table/catalog_product_site.yaml +47 -47
- package/hedhog/table/catalog_product_tag.yaml +19 -19
- package/hedhog/table/catalog_score_criterion.yaml +25 -8
- package/hedhog/table/catalog_seo_page_rule.yaml +2 -2
- package/hedhog/table/catalog_similarity_rule.yaml +19 -6
- package/hedhog/table/catalog_site.yaml +8 -0
- package/hedhog/table/catalog_site_category.yaml +3 -3
- package/package.json +7 -7
- package/src/catalog-resource.config.ts +51 -24
- package/src/catalog.controller.ts +67 -0
- package/src/catalog.module.ts +5 -1
- package/src/catalog.service.ts +1531 -6
- package/src/index.ts +1 -1
- package/src/language/en.json +4 -4
- package/src/language/pt.json +4 -4
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: slug
|
|
4
|
-
type: varchar
|
|
5
|
-
length: 255
|
|
6
|
-
- name: name
|
|
7
|
-
type: varchar
|
|
8
|
-
length: 255
|
|
9
|
-
- name: status
|
|
10
|
-
type: enum
|
|
11
|
-
values: [active, inactive]
|
|
12
|
-
default: active
|
|
13
|
-
- name: merchant_type
|
|
14
|
-
type: enum
|
|
15
|
-
values: [retailer, marketplace, saas, direct]
|
|
16
|
-
default: retailer
|
|
17
|
-
- name: logo_file_id
|
|
18
|
-
type: fk
|
|
19
|
-
isNullable: true
|
|
20
|
-
references:
|
|
21
|
-
table: file
|
|
22
|
-
column: id
|
|
23
|
-
onDelete: SET NULL
|
|
24
|
-
- type: created_at
|
|
25
|
-
- type: updated_at
|
|
26
|
-
indices:
|
|
27
|
-
- columns: [slug]
|
|
28
|
-
isUnique: true
|
|
29
|
-
- columns: [status]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: slug
|
|
4
|
+
type: varchar
|
|
5
|
+
length: 255
|
|
6
|
+
- name: name
|
|
7
|
+
type: varchar
|
|
8
|
+
length: 255
|
|
9
|
+
- name: status
|
|
10
|
+
type: enum
|
|
11
|
+
values: [active, inactive]
|
|
12
|
+
default: active
|
|
13
|
+
- name: merchant_type
|
|
14
|
+
type: enum
|
|
15
|
+
values: [retailer, marketplace, saas, direct]
|
|
16
|
+
default: retailer
|
|
17
|
+
- name: logo_file_id
|
|
18
|
+
type: fk
|
|
19
|
+
isNullable: true
|
|
20
|
+
references:
|
|
21
|
+
table: file
|
|
22
|
+
column: id
|
|
23
|
+
onDelete: SET NULL
|
|
24
|
+
- type: created_at
|
|
25
|
+
- type: updated_at
|
|
26
|
+
indices:
|
|
27
|
+
- columns: [slug]
|
|
28
|
+
isUnique: true
|
|
29
|
+
- columns: [status]
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: product_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_product
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: merchant_id
|
|
10
|
-
type: fk
|
|
11
|
-
references:
|
|
12
|
-
table: catalog_merchant
|
|
13
|
-
column: id
|
|
14
|
-
onDelete: CASCADE
|
|
15
|
-
- name: affiliate_program_id
|
|
16
|
-
type: fk
|
|
17
|
-
isNullable: true
|
|
18
|
-
references:
|
|
19
|
-
table: catalog_affiliate_program
|
|
20
|
-
column: id
|
|
21
|
-
onDelete: SET NULL
|
|
22
|
-
- name: site_id
|
|
23
|
-
type: fk
|
|
24
|
-
isNullable: true
|
|
25
|
-
references:
|
|
26
|
-
table: catalog_site
|
|
27
|
-
column: id
|
|
28
|
-
onDelete: SET NULL
|
|
29
|
-
- name: external_offer_id
|
|
30
|
-
type: varchar
|
|
31
|
-
length: 255
|
|
32
|
-
- name: title
|
|
33
|
-
type: varchar
|
|
34
|
-
length: 255
|
|
35
|
-
- name: price_amount
|
|
36
|
-
type: decimal
|
|
37
|
-
precision: 14
|
|
38
|
-
scale: 2
|
|
39
|
-
- name: price_currency
|
|
40
|
-
type: varchar
|
|
41
|
-
length: 3
|
|
42
|
-
- name: original_price_amount
|
|
43
|
-
type: decimal
|
|
44
|
-
precision: 14
|
|
45
|
-
scale: 2
|
|
46
|
-
isNullable: true
|
|
47
|
-
- name: installment_json
|
|
48
|
-
type: json
|
|
49
|
-
isNullable: true
|
|
50
|
-
- name: availability_status
|
|
51
|
-
type: enum
|
|
52
|
-
values: [in_stock, out_of_stock, pre_order, unknown]
|
|
53
|
-
default: unknown
|
|
54
|
-
- name: affiliate_url
|
|
55
|
-
type: varchar
|
|
56
|
-
length: 500
|
|
57
|
-
isNullable: true
|
|
58
|
-
- name: deep_link_url
|
|
59
|
-
type: varchar
|
|
60
|
-
length: 500
|
|
61
|
-
isNullable: true
|
|
62
|
-
- name: priority_score
|
|
63
|
-
type: int
|
|
64
|
-
default: 0
|
|
65
|
-
- name: is_featured
|
|
66
|
-
type: boolean
|
|
67
|
-
default: false
|
|
68
|
-
- name: valid_from
|
|
69
|
-
type: datetime
|
|
70
|
-
isNullable: true
|
|
71
|
-
- name: valid_until
|
|
72
|
-
type: datetime
|
|
73
|
-
isNullable: true
|
|
74
|
-
- name: last_seen_at
|
|
75
|
-
type: datetime
|
|
76
|
-
isNullable: true
|
|
77
|
-
- type: created_at
|
|
78
|
-
- type: updated_at
|
|
79
|
-
indices:
|
|
80
|
-
- columns: [product_id, merchant_id, external_offer_id]
|
|
81
|
-
isUnique: true
|
|
82
|
-
- columns: [product_id, availability_status, price_amount]
|
|
83
|
-
- columns: [site_id, is_featured]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: product_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_product
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: merchant_id
|
|
10
|
+
type: fk
|
|
11
|
+
references:
|
|
12
|
+
table: catalog_merchant
|
|
13
|
+
column: id
|
|
14
|
+
onDelete: CASCADE
|
|
15
|
+
- name: affiliate_program_id
|
|
16
|
+
type: fk
|
|
17
|
+
isNullable: true
|
|
18
|
+
references:
|
|
19
|
+
table: catalog_affiliate_program
|
|
20
|
+
column: id
|
|
21
|
+
onDelete: SET NULL
|
|
22
|
+
- name: site_id
|
|
23
|
+
type: fk
|
|
24
|
+
isNullable: true
|
|
25
|
+
references:
|
|
26
|
+
table: catalog_site
|
|
27
|
+
column: id
|
|
28
|
+
onDelete: SET NULL
|
|
29
|
+
- name: external_offer_id
|
|
30
|
+
type: varchar
|
|
31
|
+
length: 255
|
|
32
|
+
- name: title
|
|
33
|
+
type: varchar
|
|
34
|
+
length: 255
|
|
35
|
+
- name: price_amount
|
|
36
|
+
type: decimal
|
|
37
|
+
precision: 14
|
|
38
|
+
scale: 2
|
|
39
|
+
- name: price_currency
|
|
40
|
+
type: varchar
|
|
41
|
+
length: 3
|
|
42
|
+
- name: original_price_amount
|
|
43
|
+
type: decimal
|
|
44
|
+
precision: 14
|
|
45
|
+
scale: 2
|
|
46
|
+
isNullable: true
|
|
47
|
+
- name: installment_json
|
|
48
|
+
type: json
|
|
49
|
+
isNullable: true
|
|
50
|
+
- name: availability_status
|
|
51
|
+
type: enum
|
|
52
|
+
values: [in_stock, out_of_stock, pre_order, unknown]
|
|
53
|
+
default: unknown
|
|
54
|
+
- name: affiliate_url
|
|
55
|
+
type: varchar
|
|
56
|
+
length: 500
|
|
57
|
+
isNullable: true
|
|
58
|
+
- name: deep_link_url
|
|
59
|
+
type: varchar
|
|
60
|
+
length: 500
|
|
61
|
+
isNullable: true
|
|
62
|
+
- name: priority_score
|
|
63
|
+
type: int
|
|
64
|
+
default: 0
|
|
65
|
+
- name: is_featured
|
|
66
|
+
type: boolean
|
|
67
|
+
default: false
|
|
68
|
+
- name: valid_from
|
|
69
|
+
type: datetime
|
|
70
|
+
isNullable: true
|
|
71
|
+
- name: valid_until
|
|
72
|
+
type: datetime
|
|
73
|
+
isNullable: true
|
|
74
|
+
- name: last_seen_at
|
|
75
|
+
type: datetime
|
|
76
|
+
isNullable: true
|
|
77
|
+
- type: created_at
|
|
78
|
+
- type: updated_at
|
|
79
|
+
indices:
|
|
80
|
+
- columns: [product_id, merchant_id, external_offer_id]
|
|
81
|
+
isUnique: true
|
|
82
|
+
- columns: [product_id, availability_status, price_amount]
|
|
83
|
+
- columns: [site_id, is_featured]
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: offer_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_offer
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: product_id
|
|
10
|
-
type: fk
|
|
11
|
-
references:
|
|
12
|
-
table: catalog_product
|
|
13
|
-
column: id
|
|
14
|
-
onDelete: CASCADE
|
|
15
|
-
- name: captured_at
|
|
16
|
-
type: datetime
|
|
17
|
-
- name: price_amount
|
|
18
|
-
type: decimal
|
|
19
|
-
precision: 14
|
|
20
|
-
scale: 2
|
|
21
|
-
- name: original_price_amount
|
|
22
|
-
type: decimal
|
|
23
|
-
precision: 14
|
|
24
|
-
scale: 2
|
|
25
|
-
isNullable: true
|
|
26
|
-
- name: availability_status
|
|
27
|
-
type: enum
|
|
28
|
-
values: [in_stock, out_of_stock, pre_order, unknown]
|
|
29
|
-
default: unknown
|
|
30
|
-
- type: created_at
|
|
31
|
-
- type: updated_at
|
|
32
|
-
indices:
|
|
33
|
-
- columns: [product_id, captured_at]
|
|
34
|
-
- columns: [offer_id, captured_at]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: offer_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_offer
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: product_id
|
|
10
|
+
type: fk
|
|
11
|
+
references:
|
|
12
|
+
table: catalog_product
|
|
13
|
+
column: id
|
|
14
|
+
onDelete: CASCADE
|
|
15
|
+
- name: captured_at
|
|
16
|
+
type: datetime
|
|
17
|
+
- name: price_amount
|
|
18
|
+
type: decimal
|
|
19
|
+
precision: 14
|
|
20
|
+
scale: 2
|
|
21
|
+
- name: original_price_amount
|
|
22
|
+
type: decimal
|
|
23
|
+
precision: 14
|
|
24
|
+
scale: 2
|
|
25
|
+
isNullable: true
|
|
26
|
+
- name: availability_status
|
|
27
|
+
type: enum
|
|
28
|
+
values: [in_stock, out_of_stock, pre_order, unknown]
|
|
29
|
+
default: unknown
|
|
30
|
+
- type: created_at
|
|
31
|
+
- type: updated_at
|
|
32
|
+
indices:
|
|
33
|
+
- columns: [product_id, captured_at]
|
|
34
|
+
- columns: [offer_id, captured_at]
|
|
@@ -7,10 +7,10 @@ columns:
|
|
|
7
7
|
table: catalog_brand
|
|
8
8
|
column: id
|
|
9
9
|
onDelete: SET NULL
|
|
10
|
-
- name:
|
|
10
|
+
- name: catalog_category_id
|
|
11
11
|
type: fk
|
|
12
12
|
references:
|
|
13
|
-
table:
|
|
13
|
+
table: catalog_category
|
|
14
14
|
column: id
|
|
15
15
|
onDelete: RESTRICT
|
|
16
16
|
- name: primary_content_id
|
|
@@ -56,9 +56,11 @@ columns:
|
|
|
56
56
|
- name: release_date
|
|
57
57
|
type: datetime
|
|
58
58
|
isNullable: true
|
|
59
|
+
# Secondary cache/snapshot used for denormalized reads and legacy payload compatibility.
|
|
59
60
|
- name: spec_snapshot_json
|
|
60
61
|
type: json
|
|
61
62
|
isNullable: true
|
|
63
|
+
# Secondary cache/snapshot used for denormalized comparison payloads.
|
|
62
64
|
- name: comparison_snapshot_json
|
|
63
65
|
type: json
|
|
64
66
|
isNullable: true
|
|
@@ -70,7 +72,7 @@ columns:
|
|
|
70
72
|
indices:
|
|
71
73
|
- columns: [slug]
|
|
72
74
|
isUnique: true
|
|
73
|
-
- columns: [
|
|
75
|
+
- columns: [catalog_category_id, status]
|
|
74
76
|
- columns: [brand_id, status]
|
|
75
77
|
- columns: [primary_content_id]
|
|
76
78
|
- columns: [is_active]
|
|
@@ -12,6 +12,13 @@ columns:
|
|
|
12
12
|
table: catalog_attribute
|
|
13
13
|
column: id
|
|
14
14
|
onDelete: CASCADE
|
|
15
|
+
- name: attribute_option_id
|
|
16
|
+
type: fk
|
|
17
|
+
isNullable: true
|
|
18
|
+
references:
|
|
19
|
+
table: catalog_attribute_option
|
|
20
|
+
column: id
|
|
21
|
+
onDelete: SET NULL
|
|
15
22
|
- name: value_text
|
|
16
23
|
type: text
|
|
17
24
|
isNullable: true
|
|
@@ -23,13 +30,17 @@ columns:
|
|
|
23
30
|
- name: value_boolean
|
|
24
31
|
type: boolean
|
|
25
32
|
isNullable: true
|
|
26
|
-
- name:
|
|
27
|
-
type:
|
|
33
|
+
- name: raw_value
|
|
34
|
+
type: text
|
|
28
35
|
isNullable: true
|
|
29
36
|
- name: value_unit
|
|
30
37
|
type: varchar
|
|
31
38
|
length: 63
|
|
32
39
|
isNullable: true
|
|
40
|
+
- name: normalized_value
|
|
41
|
+
type: varchar
|
|
42
|
+
length: 255
|
|
43
|
+
isNullable: true
|
|
33
44
|
- name: normalized_text
|
|
34
45
|
type: varchar
|
|
35
46
|
length: 255
|
|
@@ -56,5 +67,7 @@ columns:
|
|
|
56
67
|
indices:
|
|
57
68
|
- columns: [product_id, attribute_id]
|
|
58
69
|
isUnique: true
|
|
70
|
+
- columns: [attribute_id, attribute_option_id]
|
|
71
|
+
- columns: [attribute_id, normalized_value]
|
|
59
72
|
- columns: [attribute_id, normalized_number]
|
|
60
73
|
- columns: [attribute_id, normalized_text]
|
|
@@ -6,10 +6,10 @@ columns:
|
|
|
6
6
|
table: catalog_product
|
|
7
7
|
column: id
|
|
8
8
|
onDelete: CASCADE
|
|
9
|
-
- name:
|
|
9
|
+
- name: catalog_category_id
|
|
10
10
|
type: fk
|
|
11
11
|
references:
|
|
12
|
-
table:
|
|
12
|
+
table: catalog_category
|
|
13
13
|
column: id
|
|
14
14
|
onDelete: CASCADE
|
|
15
15
|
- name: is_primary
|
|
@@ -21,6 +21,6 @@ columns:
|
|
|
21
21
|
- type: created_at
|
|
22
22
|
- type: updated_at
|
|
23
23
|
indices:
|
|
24
|
-
- columns: [product_id,
|
|
24
|
+
- columns: [product_id, catalog_category_id]
|
|
25
25
|
isUnique: true
|
|
26
26
|
- columns: [product_id, is_primary]
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: product_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_product
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: file_id
|
|
10
|
-
type: fk
|
|
11
|
-
references:
|
|
12
|
-
table: file
|
|
13
|
-
column: id
|
|
14
|
-
onDelete: CASCADE
|
|
15
|
-
- name: role
|
|
16
|
-
type: enum
|
|
17
|
-
values: [primary, gallery, thumbnail, lifestyle, technical]
|
|
18
|
-
default: gallery
|
|
19
|
-
- name: sort_order
|
|
20
|
-
type: int
|
|
21
|
-
default: 0
|
|
22
|
-
- name: is_primary
|
|
23
|
-
type: boolean
|
|
24
|
-
default: false
|
|
25
|
-
- name: alt_text
|
|
26
|
-
type: varchar
|
|
27
|
-
length: 255
|
|
28
|
-
isNullable: true
|
|
29
|
-
- type: created_at
|
|
30
|
-
- type: updated_at
|
|
31
|
-
indices:
|
|
32
|
-
- columns: [product_id, sort_order]
|
|
33
|
-
- columns: [product_id, is_primary]
|
|
34
|
-
- columns: [file_id]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: product_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_product
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: file_id
|
|
10
|
+
type: fk
|
|
11
|
+
references:
|
|
12
|
+
table: file
|
|
13
|
+
column: id
|
|
14
|
+
onDelete: CASCADE
|
|
15
|
+
- name: role
|
|
16
|
+
type: enum
|
|
17
|
+
values: [primary, gallery, thumbnail, lifestyle, technical]
|
|
18
|
+
default: gallery
|
|
19
|
+
- name: sort_order
|
|
20
|
+
type: int
|
|
21
|
+
default: 0
|
|
22
|
+
- name: is_primary
|
|
23
|
+
type: boolean
|
|
24
|
+
default: false
|
|
25
|
+
- name: alt_text
|
|
26
|
+
type: varchar
|
|
27
|
+
length: 255
|
|
28
|
+
isNullable: true
|
|
29
|
+
- type: created_at
|
|
30
|
+
- type: updated_at
|
|
31
|
+
indices:
|
|
32
|
+
- columns: [product_id, sort_order]
|
|
33
|
+
- columns: [product_id, is_primary]
|
|
34
|
+
- columns: [file_id]
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: product_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_product
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: criterion_id
|
|
10
|
-
type: fk
|
|
11
|
-
references:
|
|
12
|
-
table: catalog_score_criterion
|
|
13
|
-
column: id
|
|
14
|
-
onDelete: CASCADE
|
|
15
|
-
- name: score_value
|
|
16
|
-
type: decimal
|
|
17
|
-
precision: 5
|
|
18
|
-
scale: 2
|
|
19
|
-
- name: score_label
|
|
20
|
-
type: varchar
|
|
21
|
-
length: 255
|
|
22
|
-
isNullable: true
|
|
23
|
-
- name: summary
|
|
24
|
-
type: text
|
|
25
|
-
isNullable: true
|
|
26
|
-
- name: calculation_source
|
|
27
|
-
type: varchar
|
|
28
|
-
length: 255
|
|
29
|
-
isNullable: true
|
|
30
|
-
- name: is_manual_override
|
|
31
|
-
type: boolean
|
|
32
|
-
default: false
|
|
33
|
-
- type: created_at
|
|
34
|
-
- type: updated_at
|
|
35
|
-
indices:
|
|
36
|
-
- columns: [product_id, criterion_id]
|
|
37
|
-
isUnique: true
|
|
38
|
-
- columns: [criterion_id, score_value]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: product_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_product
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: criterion_id
|
|
10
|
+
type: fk
|
|
11
|
+
references:
|
|
12
|
+
table: catalog_score_criterion
|
|
13
|
+
column: id
|
|
14
|
+
onDelete: CASCADE
|
|
15
|
+
- name: score_value
|
|
16
|
+
type: decimal
|
|
17
|
+
precision: 5
|
|
18
|
+
scale: 2
|
|
19
|
+
- name: score_label
|
|
20
|
+
type: varchar
|
|
21
|
+
length: 255
|
|
22
|
+
isNullable: true
|
|
23
|
+
- name: summary
|
|
24
|
+
type: text
|
|
25
|
+
isNullable: true
|
|
26
|
+
- name: calculation_source
|
|
27
|
+
type: varchar
|
|
28
|
+
length: 255
|
|
29
|
+
isNullable: true
|
|
30
|
+
- name: is_manual_override
|
|
31
|
+
type: boolean
|
|
32
|
+
default: false
|
|
33
|
+
- type: created_at
|
|
34
|
+
- type: updated_at
|
|
35
|
+
indices:
|
|
36
|
+
- columns: [product_id, criterion_id]
|
|
37
|
+
isUnique: true
|
|
38
|
+
- columns: [criterion_id, score_value]
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: product_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_product
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: site_id
|
|
10
|
-
type: fk
|
|
11
|
-
references:
|
|
12
|
-
table: catalog_site
|
|
13
|
-
column: id
|
|
14
|
-
onDelete: CASCADE
|
|
15
|
-
- name: publication_status
|
|
16
|
-
type: enum
|
|
17
|
-
values: [draft, published, hidden]
|
|
18
|
-
default: draft
|
|
19
|
-
- name: canonical_slug
|
|
20
|
-
type: varchar
|
|
21
|
-
length: 255
|
|
22
|
-
- name: is_featured
|
|
23
|
-
type: boolean
|
|
24
|
-
default: false
|
|
25
|
-
- name: visibility_score
|
|
26
|
-
type: int
|
|
27
|
-
default: 0
|
|
28
|
-
- name: override_brand_name
|
|
29
|
-
type: varchar
|
|
30
|
-
length: 255
|
|
31
|
-
isNullable: true
|
|
32
|
-
- name: seo_title
|
|
33
|
-
type: varchar
|
|
34
|
-
length: 255
|
|
35
|
-
isNullable: true
|
|
36
|
-
- name: seo_description
|
|
37
|
-
type: varchar
|
|
38
|
-
length: 500
|
|
39
|
-
isNullable: true
|
|
40
|
-
- type: created_at
|
|
41
|
-
- type: updated_at
|
|
42
|
-
indices:
|
|
43
|
-
- columns: [site_id, product_id]
|
|
44
|
-
isUnique: true
|
|
45
|
-
- columns: [site_id, canonical_slug]
|
|
46
|
-
isUnique: true
|
|
47
|
-
- columns: [site_id, publication_status]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: product_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_product
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: site_id
|
|
10
|
+
type: fk
|
|
11
|
+
references:
|
|
12
|
+
table: catalog_site
|
|
13
|
+
column: id
|
|
14
|
+
onDelete: CASCADE
|
|
15
|
+
- name: publication_status
|
|
16
|
+
type: enum
|
|
17
|
+
values: [draft, published, hidden]
|
|
18
|
+
default: draft
|
|
19
|
+
- name: canonical_slug
|
|
20
|
+
type: varchar
|
|
21
|
+
length: 255
|
|
22
|
+
- name: is_featured
|
|
23
|
+
type: boolean
|
|
24
|
+
default: false
|
|
25
|
+
- name: visibility_score
|
|
26
|
+
type: int
|
|
27
|
+
default: 0
|
|
28
|
+
- name: override_brand_name
|
|
29
|
+
type: varchar
|
|
30
|
+
length: 255
|
|
31
|
+
isNullable: true
|
|
32
|
+
- name: seo_title
|
|
33
|
+
type: varchar
|
|
34
|
+
length: 255
|
|
35
|
+
isNullable: true
|
|
36
|
+
- name: seo_description
|
|
37
|
+
type: varchar
|
|
38
|
+
length: 500
|
|
39
|
+
isNullable: true
|
|
40
|
+
- type: created_at
|
|
41
|
+
- type: updated_at
|
|
42
|
+
indices:
|
|
43
|
+
- columns: [site_id, product_id]
|
|
44
|
+
isUnique: true
|
|
45
|
+
- columns: [site_id, canonical_slug]
|
|
46
|
+
isUnique: true
|
|
47
|
+
- columns: [site_id, publication_status]
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: product_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_product
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: tag_id
|
|
10
|
-
type: fk
|
|
11
|
-
references:
|
|
12
|
-
table: tag
|
|
13
|
-
column: id
|
|
14
|
-
onDelete: CASCADE
|
|
15
|
-
- type: created_at
|
|
16
|
-
- type: updated_at
|
|
17
|
-
indices:
|
|
18
|
-
- columns: [product_id, tag_id]
|
|
19
|
-
isUnique: true
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: product_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_product
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: tag_id
|
|
10
|
+
type: fk
|
|
11
|
+
references:
|
|
12
|
+
table: tag
|
|
13
|
+
column: id
|
|
14
|
+
onDelete: CASCADE
|
|
15
|
+
- type: created_at
|
|
16
|
+
- type: updated_at
|
|
17
|
+
indices:
|
|
18
|
+
- columns: [product_id, tag_id]
|
|
19
|
+
isUnique: true
|