tt-entities 0.1.17 → 0.1.18

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"}
@@ -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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-entities",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
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
+ };