@hed-hog/catalog 0.0.294 → 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 +409 -409
- package/dist/catalog.service.d.ts.map +1 -1
- package/dist/catalog.service.js +14 -6
- package/dist/catalog.service.js.map +1 -1
- package/hedhog/data/catalog_attribute.yaml +202 -202
- package/hedhog/data/catalog_attribute_option.yaml +109 -109
- package/hedhog/data/catalog_category.yaml +47 -47
- package/hedhog/data/catalog_category_attribute.yaml +209 -209
- package/hedhog/data/menu.yaml +133 -133
- package/hedhog/data/role.yaml +7 -7
- package/hedhog/data/route.yaml +72 -72
- package/hedhog/frontend/app/[resource]/page.tsx.ejs +391 -391
- package/hedhog/frontend/app/_components/catalog-ai-form-assist-dialog.tsx.ejs +340 -340
- package/hedhog/frontend/app/_components/catalog-resource-form-sheet.tsx.ejs +907 -907
- package/hedhog/frontend/app/_lib/catalog-resources.tsx.ejs +929 -929
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +14 -83
- package/hedhog/frontend/messages/en.json +389 -389
- package/hedhog/frontend/messages/pt.json +389 -389
- package/hedhog/table/catalog_affiliate_program.yaml +41 -41
- package/hedhog/table/catalog_attribute.yaml +67 -67
- package/hedhog/table/catalog_attribute_group.yaml +18 -18
- package/hedhog/table/catalog_attribute_option.yaml +40 -40
- package/hedhog/table/catalog_brand.yaml +34 -34
- package/hedhog/table/catalog_category.yaml +40 -40
- package/hedhog/table/catalog_category_attribute.yaml +37 -37
- package/hedhog/table/catalog_click_event.yaml +50 -50
- package/hedhog/table/catalog_comparison.yaml +19 -19
- 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 +30 -30
- package/hedhog/table/catalog_product_attribute_value.yaml +44 -44
- package/hedhog/table/catalog_product_category.yaml +13 -13
- 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 +42 -42
- package/hedhog/table/catalog_seo_page_rule.yaml +10 -10
- package/hedhog/table/catalog_similarity_rule.yaml +33 -33
- package/hedhog/table/catalog_site.yaml +21 -21
- package/hedhog/table/catalog_site_category.yaml +12 -12
- package/package.json +6 -6
- package/src/catalog-resource.config.ts +132 -132
- package/src/catalog.controller.ts +91 -91
- package/src/catalog.module.ts +16 -16
- package/src/catalog.service.ts +1585 -1573
- package/src/index.ts +1 -1
- package/src/language/en.json +4 -4
- package/src/language/pt.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: catalog_category_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_category
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: RESTRICT
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: catalog_category_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_category
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: RESTRICT
|
|
9
9
|
- name: site_id
|
|
10
10
|
type: fk
|
|
11
11
|
references:
|
|
@@ -43,20 +43,20 @@ columns:
|
|
|
43
43
|
- name: intro
|
|
44
44
|
type: text
|
|
45
45
|
isNullable: true
|
|
46
|
-
- name: verdict
|
|
47
|
-
type: text
|
|
48
|
-
isNullable: true
|
|
49
|
-
- name: eligibility_hash
|
|
50
|
-
type: varchar
|
|
51
|
-
length: 255
|
|
46
|
+
- name: verdict
|
|
47
|
+
type: text
|
|
48
|
+
isNullable: true
|
|
49
|
+
- name: eligibility_hash
|
|
50
|
+
type: varchar
|
|
51
|
+
length: 255
|
|
52
52
|
isNullable: true
|
|
53
53
|
- name: published_at
|
|
54
54
|
type: datetime
|
|
55
55
|
isNullable: true
|
|
56
56
|
- type: created_at
|
|
57
57
|
- type: updated_at
|
|
58
|
-
indices:
|
|
59
|
-
- columns: [site_id, slug]
|
|
60
|
-
isUnique: true
|
|
61
|
-
- columns: [catalog_category_id, status]
|
|
62
|
-
- columns: [generation_mode, status]
|
|
58
|
+
indices:
|
|
59
|
+
- columns: [site_id, slug]
|
|
60
|
+
isUnique: true
|
|
61
|
+
- columns: [catalog_category_id, status]
|
|
62
|
+
- columns: [generation_mode, status]
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: comparison_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_comparison
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: product_id
|
|
10
|
-
type: fk
|
|
11
|
-
isNullable: true
|
|
12
|
-
references:
|
|
13
|
-
table: catalog_product
|
|
14
|
-
column: id
|
|
15
|
-
onDelete: SET NULL
|
|
16
|
-
- name: attribute_id
|
|
17
|
-
type: fk
|
|
18
|
-
isNullable: true
|
|
19
|
-
references:
|
|
20
|
-
table: catalog_attribute
|
|
21
|
-
column: id
|
|
22
|
-
onDelete: SET NULL
|
|
23
|
-
- name: highlight_type
|
|
24
|
-
type: enum
|
|
25
|
-
values: [pro, con, difference, summary, verdict]
|
|
26
|
-
default: summary
|
|
27
|
-
- name: title
|
|
28
|
-
type: varchar
|
|
29
|
-
length: 255
|
|
30
|
-
- name: body
|
|
31
|
-
type: text
|
|
32
|
-
isNullable: true
|
|
33
|
-
- name: sort_order
|
|
34
|
-
type: int
|
|
35
|
-
default: 0
|
|
36
|
-
- type: created_at
|
|
37
|
-
- type: updated_at
|
|
38
|
-
indices:
|
|
39
|
-
- columns: [comparison_id, highlight_type, sort_order]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: comparison_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_comparison
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: product_id
|
|
10
|
+
type: fk
|
|
11
|
+
isNullable: true
|
|
12
|
+
references:
|
|
13
|
+
table: catalog_product
|
|
14
|
+
column: id
|
|
15
|
+
onDelete: SET NULL
|
|
16
|
+
- name: attribute_id
|
|
17
|
+
type: fk
|
|
18
|
+
isNullable: true
|
|
19
|
+
references:
|
|
20
|
+
table: catalog_attribute
|
|
21
|
+
column: id
|
|
22
|
+
onDelete: SET NULL
|
|
23
|
+
- name: highlight_type
|
|
24
|
+
type: enum
|
|
25
|
+
values: [pro, con, difference, summary, verdict]
|
|
26
|
+
default: summary
|
|
27
|
+
- name: title
|
|
28
|
+
type: varchar
|
|
29
|
+
length: 255
|
|
30
|
+
- name: body
|
|
31
|
+
type: text
|
|
32
|
+
isNullable: true
|
|
33
|
+
- name: sort_order
|
|
34
|
+
type: int
|
|
35
|
+
default: 0
|
|
36
|
+
- type: created_at
|
|
37
|
+
- type: updated_at
|
|
38
|
+
indices:
|
|
39
|
+
- columns: [comparison_id, highlight_type, sort_order]
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: comparison_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_comparison
|
|
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: sort_order
|
|
16
|
-
type: int
|
|
17
|
-
default: 0
|
|
18
|
-
- name: is_winner
|
|
19
|
-
type: boolean
|
|
20
|
-
default: false
|
|
21
|
-
- name: badge_label
|
|
22
|
-
type: varchar
|
|
23
|
-
length: 255
|
|
24
|
-
isNullable: true
|
|
25
|
-
- type: created_at
|
|
26
|
-
- type: updated_at
|
|
27
|
-
indices:
|
|
28
|
-
- columns: [comparison_id, product_id]
|
|
29
|
-
isUnique: true
|
|
30
|
-
- columns: [product_id]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: comparison_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_comparison
|
|
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: sort_order
|
|
16
|
+
type: int
|
|
17
|
+
default: 0
|
|
18
|
+
- name: is_winner
|
|
19
|
+
type: boolean
|
|
20
|
+
default: false
|
|
21
|
+
- name: badge_label
|
|
22
|
+
type: varchar
|
|
23
|
+
length: 255
|
|
24
|
+
isNullable: true
|
|
25
|
+
- type: created_at
|
|
26
|
+
- type: updated_at
|
|
27
|
+
indices:
|
|
28
|
+
- columns: [comparison_id, product_id]
|
|
29
|
+
isUnique: true
|
|
30
|
+
- columns: [product_id]
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: site_id
|
|
4
|
-
type: fk
|
|
5
|
-
isNullable: true
|
|
6
|
-
references:
|
|
7
|
-
table: catalog_site
|
|
8
|
-
column: id
|
|
9
|
-
onDelete: SET NULL
|
|
10
|
-
- name: content_id
|
|
11
|
-
type: fk
|
|
12
|
-
references:
|
|
13
|
-
table: content
|
|
14
|
-
column: id
|
|
15
|
-
onDelete: CASCADE
|
|
16
|
-
- name: product_id
|
|
17
|
-
type: fk
|
|
18
|
-
isNullable: true
|
|
19
|
-
references:
|
|
20
|
-
table: catalog_product
|
|
21
|
-
column: id
|
|
22
|
-
onDelete: SET NULL
|
|
23
|
-
- name: comparison_id
|
|
24
|
-
type: fk
|
|
25
|
-
isNullable: true
|
|
26
|
-
references:
|
|
27
|
-
table: catalog_comparison
|
|
28
|
-
column: id
|
|
29
|
-
onDelete: SET NULL
|
|
30
|
-
- name: relation_type
|
|
31
|
-
type: enum
|
|
32
|
-
values: [primary, related, review, guide, faq]
|
|
33
|
-
default: related
|
|
34
|
-
- name: sort_order
|
|
35
|
-
type: int
|
|
36
|
-
default: 0
|
|
37
|
-
- type: created_at
|
|
38
|
-
- type: updated_at
|
|
39
|
-
indices:
|
|
40
|
-
- columns: [product_id, relation_type]
|
|
41
|
-
- columns: [comparison_id, relation_type]
|
|
42
|
-
- columns: [site_id, content_id]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: site_id
|
|
4
|
+
type: fk
|
|
5
|
+
isNullable: true
|
|
6
|
+
references:
|
|
7
|
+
table: catalog_site
|
|
8
|
+
column: id
|
|
9
|
+
onDelete: SET NULL
|
|
10
|
+
- name: content_id
|
|
11
|
+
type: fk
|
|
12
|
+
references:
|
|
13
|
+
table: content
|
|
14
|
+
column: id
|
|
15
|
+
onDelete: CASCADE
|
|
16
|
+
- name: product_id
|
|
17
|
+
type: fk
|
|
18
|
+
isNullable: true
|
|
19
|
+
references:
|
|
20
|
+
table: catalog_product
|
|
21
|
+
column: id
|
|
22
|
+
onDelete: SET NULL
|
|
23
|
+
- name: comparison_id
|
|
24
|
+
type: fk
|
|
25
|
+
isNullable: true
|
|
26
|
+
references:
|
|
27
|
+
table: catalog_comparison
|
|
28
|
+
column: id
|
|
29
|
+
onDelete: SET NULL
|
|
30
|
+
- name: relation_type
|
|
31
|
+
type: enum
|
|
32
|
+
values: [primary, related, review, guide, faq]
|
|
33
|
+
default: related
|
|
34
|
+
- name: sort_order
|
|
35
|
+
type: int
|
|
36
|
+
default: 0
|
|
37
|
+
- type: created_at
|
|
38
|
+
- type: updated_at
|
|
39
|
+
indices:
|
|
40
|
+
- columns: [product_id, relation_type]
|
|
41
|
+
- columns: [comparison_id, relation_type]
|
|
42
|
+
- columns: [site_id, content_id]
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: source_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: catalog_import_source
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
- name: started_at
|
|
10
|
-
type: datetime
|
|
11
|
-
- name: finished_at
|
|
12
|
-
type: datetime
|
|
13
|
-
isNullable: true
|
|
14
|
-
- name: status
|
|
15
|
-
type: enum
|
|
16
|
-
values: [pending, running, completed, failed]
|
|
17
|
-
default: pending
|
|
18
|
-
- name: stats_json
|
|
19
|
-
type: json
|
|
20
|
-
isNullable: true
|
|
21
|
-
- name: error_log
|
|
22
|
-
type: text
|
|
23
|
-
isNullable: true
|
|
24
|
-
- name: idempotency_key
|
|
25
|
-
type: varchar
|
|
26
|
-
length: 255
|
|
27
|
-
isNullable: true
|
|
28
|
-
- type: created_at
|
|
29
|
-
- type: updated_at
|
|
30
|
-
indices:
|
|
31
|
-
- columns: [source_id, started_at]
|
|
32
|
-
- columns: [source_id, idempotency_key]
|
|
33
|
-
isUnique: true
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: source_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: catalog_import_source
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: started_at
|
|
10
|
+
type: datetime
|
|
11
|
+
- name: finished_at
|
|
12
|
+
type: datetime
|
|
13
|
+
isNullable: true
|
|
14
|
+
- name: status
|
|
15
|
+
type: enum
|
|
16
|
+
values: [pending, running, completed, failed]
|
|
17
|
+
default: pending
|
|
18
|
+
- name: stats_json
|
|
19
|
+
type: json
|
|
20
|
+
isNullable: true
|
|
21
|
+
- name: error_log
|
|
22
|
+
type: text
|
|
23
|
+
isNullable: true
|
|
24
|
+
- name: idempotency_key
|
|
25
|
+
type: varchar
|
|
26
|
+
length: 255
|
|
27
|
+
isNullable: true
|
|
28
|
+
- type: created_at
|
|
29
|
+
- type: updated_at
|
|
30
|
+
indices:
|
|
31
|
+
- columns: [source_id, started_at]
|
|
32
|
+
- columns: [source_id, idempotency_key]
|
|
33
|
+
isUnique: true
|
|
@@ -1,24 +1,24 @@
|
|
|
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: source_type
|
|
10
|
-
type: enum
|
|
11
|
-
values: [api, feed, file, crawler]
|
|
12
|
-
default: api
|
|
13
|
-
- name: config_json
|
|
14
|
-
type: json
|
|
15
|
-
isNullable: true
|
|
16
|
-
- name: status
|
|
17
|
-
type: enum
|
|
18
|
-
values: [active, inactive]
|
|
19
|
-
default: active
|
|
20
|
-
- type: created_at
|
|
21
|
-
- type: updated_at
|
|
22
|
-
indices:
|
|
23
|
-
- columns: [slug]
|
|
24
|
-
isUnique: true
|
|
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: source_type
|
|
10
|
+
type: enum
|
|
11
|
+
values: [api, feed, file, crawler]
|
|
12
|
+
default: api
|
|
13
|
+
- name: config_json
|
|
14
|
+
type: json
|
|
15
|
+
isNullable: true
|
|
16
|
+
- name: status
|
|
17
|
+
type: enum
|
|
18
|
+
values: [active, inactive]
|
|
19
|
+
default: active
|
|
20
|
+
- type: created_at
|
|
21
|
+
- type: updated_at
|
|
22
|
+
indices:
|
|
23
|
+
- columns: [slug]
|
|
24
|
+
isUnique: true
|
|
@@ -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]
|