tt-entities 0.1.17 → 0.1.19

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.
@@ -59,7 +59,17 @@
59
59
  "Bash(pip3 install *)",
60
60
  "Bash(python3)",
61
61
  "Bash(cp /tmp/inventory_update.sql \"/private/tmp/claude-501/-Users-hosam-Documents-TatayabNewEra-DB-tatayab-database-all/6a788c09-9718-4502-8db2-6713ea7c0f06/scratchpad/inventory_stock_update.sql\" && echo \"Copied OK\")",
62
- "Bash(grep -rn \"saleStartDate\\\\|salePrice\" /Users/hosam/Documents/TatayabNewEra/Backend --include=\"*.ts\" -l 2>/dev/null | grep -v node_modules | grep -v dist | head -5)"
62
+ "Bash(grep -rn \"saleStartDate\\\\|salePrice\" /Users/hosam/Documents/TatayabNewEra/Backend --include=\"*.ts\" -l 2>/dev/null | grep -v node_modules | grep -v dist | head -5)",
63
+ "Bash(python3 generate.py)",
64
+ "Bash(grep -m 2 \"SELECT \\\\`id\\\\` FROM \\\\`VariantOptions\\\\`\" 2nd_batch_01_products.sql)",
65
+ "Bash(python3 -)",
66
+ "Bash(cp -f 2nd_batch_0[1-4]_products.sql 2nd_batch_00_brands_categories_options.sql \"/Users/hosam/Documents/TatayabNewEra/DB/tatayab-database-all/\")",
67
+ "Bash(/bin/cp 2nd_batch_0[1-4]_products.sql 2nd_batch_00_brands_categories_options.sql \"/Users/hosam/Documents/TatayabNewEra/DB/tatayab-database-all/\")",
68
+ "Bash(which mysql *)",
69
+ "Bash(command -v mysql)",
70
+ "Bash(mysql --version)",
71
+ "Bash(cp -f brands_logo_update.sql \"/Users/hosam/Documents/TatayabNewEra/DB/tatayab-database-all/\")",
72
+ "Bash(cp -f brands_logos_renamed.zip \"/Users/hosam/Downloads/\")"
63
73
  ]
64
74
  }
65
75
  }
@@ -10,6 +10,7 @@ export declare class InventoryStock extends Model {
10
10
  reservedQuantity: number;
11
11
  availableFromVendor: boolean;
12
12
  lowStockThreshold?: number;
13
+ location?: string;
13
14
  inventory: Inventory;
14
15
  product: Product;
15
16
  variant?: ProductVariant;
@@ -48,6 +48,10 @@ __decorate([
48
48
  (0, sequelize_typescript_1.Column)({ allowNull: true }),
49
49
  __metadata("design:type", Number)
50
50
  ], InventoryStock.prototype, "lowStockThreshold", void 0);
51
+ __decorate([
52
+ (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING(100), allowNull: true }),
53
+ __metadata("design:type", String)
54
+ ], InventoryStock.prototype, "location", void 0);
51
55
  __decorate([
52
56
  (0, sequelize_typescript_1.BelongsTo)(() => inventory_entity_1.Inventory),
53
57
  __metadata("design:type", inventory_entity_1.Inventory)
@@ -1 +1 @@
1
- {"version":3,"file":"inventory-stock.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/inventory-stock.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,yDAA+C;AAC/C,qDAA2C;AAC3C,qEAA0D;AAGnD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CAyCxC,CAAA;AAzCY,wCAAc;AAGjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;IAC3B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;mDACD;AAIpB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDACH;AAKlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAChC,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;wDACM;AAI1B;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;wDACK;AAIzB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;wDACK;AAMzB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;2DACK;AAG7B;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yDACO;AAK3B;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;8BACR,4BAAS;iDAAC;AAGrB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;+CAAC;AAGjB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;8BACd,uCAAc;+CAAC;yBAxCtB,cAAc;IAD1B,4BAAK;GACO,cAAc,CAyC1B"}
1
+ {"version":3,"file":"inventory-stock.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/inventory-stock.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAO8B;AAC9B,yDAA+C;AAC/C,qDAA2C;AAC3C,qEAA0D;AAGnD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CA6CxC,CAAA;AA7CY,wCAAc;AAGjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;IAC3B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;mDACD;AAIpB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDACH;AAKlB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;IAChC,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;wDACM;AAI1B;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;wDACK;AAIzB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;wDACK;AAMzB;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;2DACK;AAG7B;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yDACO;AAI3B;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;gDAC9B;AAKlB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,4BAAS,CAAC;8BACR,4BAAS;iDAAC;AAGrB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;+CAAC;AAGjB;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;8BACd,uCAAc;+CAAC;yBA5CtB,cAAc;IAD1B,4BAAK;GACO,cAAc,CA6C1B"}
@@ -6,6 +6,7 @@ export declare class ProductVariant extends Model {
6
6
  productId: number;
7
7
  sku?: string;
8
8
  barcode?: string;
9
+ oldBarcode?: string;
9
10
  priceOverride?: number;
10
11
  image?: string;
11
12
  sortOrder: number;
@@ -31,6 +31,10 @@ __decorate([
31
31
  (0, sequelize_typescript_1.Column)({ allowNull: true }),
32
32
  __metadata("design:type", String)
33
33
  ], ProductVariant.prototype, "barcode", void 0);
34
+ __decorate([
35
+ (0, sequelize_typescript_1.Column)({ allowNull: true }),
36
+ __metadata("design:type", String)
37
+ ], ProductVariant.prototype, "oldBarcode", void 0);
34
38
  __decorate([
35
39
  (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: true }),
36
40
  __metadata("design:type", Number)
@@ -1 +1 @@
1
- {"version":3,"file":"product-variant.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/product-variant.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,qDAA2C;AAC3C,mEAAwD;AACxD,mFAAuE;AACvE,kDAA+C;AAGxC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CAkCxC,CAAA;AAlCY,wCAAc;AAGjB;IAFP,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;IACzB,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDACH;AAGlB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CACP;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CACH;AAIjB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qDAC5B;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;6CACL;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;iDACF;AAMlB;IAJP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,eAAM,CAAC,CAAC;QAC7C,YAAY,EAAE,eAAM,CAAC,MAAM;KAC5B,CAAC;;8CACqB;AAKf;IADP,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,CAAC;8BACR,wBAAO;+CAAC;AAGjB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,GAAG,EAAE,CAAC,oDAAoB,CAAC;;+CAC9B;yBAjCtB,cAAc;IAD1B,4BAAK;GACO,cAAc,CAkC1B"}
1
+ {"version":3,"file":"product-variant.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/product-variant.entity.ts"],"names":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Ac,CAsC1B"}
@@ -14,6 +14,7 @@ export declare class Product extends Model {
14
14
  descriptionAr?: string;
15
15
  sku?: string;
16
16
  barcode?: string;
17
+ oldBarcode?: string;
17
18
  defaultPrice: number;
18
19
  brandId?: number;
19
20
  categoryId?: number;
@@ -48,6 +48,10 @@ __decorate([
48
48
  (0, sequelize_typescript_1.Column)({ allowNull: true }),
49
49
  __metadata("design:type", String)
50
50
  ], Product.prototype, "barcode", void 0);
51
+ __decorate([
52
+ (0, sequelize_typescript_1.Column)({ allowNull: true }),
53
+ __metadata("design:type", String)
54
+ ], Product.prototype, "oldBarcode", void 0);
51
55
  __decorate([
52
56
  (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DECIMAL(10, 3), allowNull: false, defaultValue: 0 }),
53
57
  __metadata("design:type", Number)
@@ -1 +1 @@
1
- {"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,iDAAuC;AACvC,uDAA6C;AAC7C,iEAAsD;AACtD,qEAA0D;AAC1D,iEAAsD;AACtD,6DAAkD;AAClD,iDAAuC;AACvC,6CAAmC;AACnC,kDAA+C;AAC/C,iEAAsD;AAG/C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CAoEjC,CAAA;AApEY,0BAAO;AAEV;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;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ACE;AAGtB;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,uCAAc,CAAC;;yCACK;AAG3B;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,GAAG,EAAE,CAAC,mCAAY,CAAC;;uCACvB;AAGhB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,gBAAG,EAAE,GAAG,EAAE,CAAC,+BAAU,CAAC;;qCACvB;AAGZ;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,mCAAY,CAAC;;8CACU;kBAnE3B,OAAO;IADnB,4BAAK;GACO,OAAO,CAoEnB"}
1
+ {"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAS8B;AAC9B,iDAAuC;AACvC,uDAA6C;AAC7C,iEAAsD;AACtD,qEAA0D;AAC1D,iEAAsD;AACtD,6DAAkD;AAClD,iDAAuC;AACvC,6CAAmC;AACnC,kDAA+C;AAC/C,iEAAsD;AAG/C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CAwEjC,CAAA;AAxEY,0BAAO;AAEV;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uCACN;AAGf;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAClB;AAGvB;IADP,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;oCACP;AAGb;IADP,IAAA,6BAAM,EAAC,EAAE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AE,CAAC,uCAAc,CAAC;;yCACK;AAG3B;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,GAAG,EAAE,CAAC,mCAAY,CAAC;;uCACvB;AAGhB;IADP,IAAA,oCAAa,EAAC,GAAG,EAAE,CAAC,gBAAG,EAAE,GAAG,EAAE,CAAC,+BAAU,CAAC;;qCACvB;AAGZ;IADP,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,mCAAY,CAAC;;8CACU;kBAvE3B,OAAO;IADnB,4BAAK;GACO,OAAO,CAwEnB"}
@@ -42,6 +42,10 @@ export class InventoryStock extends Model {
42
42
  @Column({ allowNull: true })
43
43
  declare lowStockThreshold?: number;
44
44
 
45
+ // Physical bin/shelf location inside the inventory (free text, e.g. "A3-R2-S5")
46
+ @Column({ type: DataType.STRING(100), allowNull: true })
47
+ declare location?: string;
48
+
45
49
  // ─── Associations ─────────────────────────────────────────────────────────────
46
50
 
47
51
  @BelongsTo(() => Inventory)
@@ -25,6 +25,10 @@ export class ProductVariant extends Model {
25
25
  @Column({ allowNull: true })
26
26
  declare barcode?: string;
27
27
 
28
+ // Legacy barcode kept for lookups after barcode replacements
29
+ @Column({ allowNull: true })
30
+ declare oldBarcode?: string;
31
+
28
32
  // Override default product price per variant if needed
29
33
  @Column({ type: DataType.DECIMAL(10, 3), allowNull: true })
30
34
  declare priceOverride?: number;
@@ -39,6 +39,10 @@ export class Product extends Model {
39
39
  @Column({ allowNull: true })
40
40
  declare barcode?: string;
41
41
 
42
+ // Legacy barcode kept for lookups after barcode replacements
43
+ @Column({ allowNull: true })
44
+ declare oldBarcode?: string;
45
+
42
46
  // Default price used when no store-specific price is set
43
47
  @Column({ type: DataType.DECIMAL(10, 3), allowNull: false, defaultValue: 0 })
44
48
  declare defaultPrice: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-entities",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "Tatayab entities library",
5
5
  "main": "dist/libs/tatayab-entities-library/index.js",
6
6
  "types": "dist/libs/tatayab-entities-library/index.d.ts",
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('sequelize-cli').Migration} */
4
+ module.exports = {
5
+ async up(queryInterface, Sequelize) {
6
+ // Physical bin/shelf location of this product/variant inside the inventory
7
+ // (free text, e.g. "A3-R2-S5") — helps the inventory team fetch stock.
8
+ await queryInterface.addColumn('InventoryStocks', 'location', {
9
+ type: Sequelize.STRING(100),
10
+ allowNull: true,
11
+ after: 'lowStockThreshold',
12
+ });
13
+ },
14
+
15
+ async down(queryInterface) {
16
+ await queryInterface.removeColumn('InventoryStocks', 'location');
17
+ },
18
+ };
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('sequelize-cli').Migration} */
4
+ module.exports = {
5
+ async up(queryInterface, Sequelize) {
6
+ // Legacy barcode kept for lookups after barcode migrations/replacements
7
+ await queryInterface.addColumn('Products', 'oldBarcode', {
8
+ type: Sequelize.STRING(100),
9
+ allowNull: true,
10
+ after: 'barcode',
11
+ });
12
+ await queryInterface.addColumn('ProductVariants', 'oldBarcode', {
13
+ type: Sequelize.STRING(100),
14
+ allowNull: true,
15
+ after: 'barcode',
16
+ });
17
+ },
18
+
19
+ async down(queryInterface) {
20
+ await queryInterface.removeColumn('Products', 'oldBarcode');
21
+ await queryInterface.removeColumn('ProductVariants', 'oldBarcode');
22
+ },
23
+ };