abhishek-akbari01 commited on
Commit
59e31fe
·
1 Parent(s): 0dbece1

fix comments

Browse files
src/controllers/invoice/invoice.controller.ts CHANGED
@@ -61,6 +61,7 @@ export const createInvoice = async (req: AuthenticatedRequest, res: Response) =>
61
  portfolioId = PWWorkorderDetails.portfolio_id;
62
  buildingId = PWWorkorderDetails.building_id;
63
  unitId = PWWorkorderDetails.unit_id;
 
64
  } else {
65
  aiServiceData.workOrderID = null;
66
  }
 
61
  portfolioId = PWWorkorderDetails.portfolio_id;
62
  buildingId = PWWorkorderDetails.building_id;
63
  unitId = PWWorkorderDetails.unit_id;
64
+ aiServiceData.workOrderID = PWWorkorderDetails.pw_id;
65
  } else {
66
  aiServiceData.workOrderID = null;
67
  }
src/db/migrations/20240927063731-create-pw-workorders-table.js CHANGED
@@ -19,19 +19,19 @@ module.exports = {
19
  type: Sequelize.INTEGER,
20
  },
21
  location: {
22
- allowNull: false,
23
  type: Sequelize.STRING,
24
  },
25
  portfolio_id: {
26
- allowNull: false,
27
  type: Sequelize.BIGINT,
28
  },
29
  building_id: {
30
- allowNull: false,
31
  type: Sequelize.BIGINT,
32
  },
33
  unit_id: {
34
- allowNull: false,
35
  type: Sequelize.BIGINT,
36
  },
37
  status: {
 
19
  type: Sequelize.INTEGER,
20
  },
21
  location: {
22
+ allowNull: true,
23
  type: Sequelize.STRING,
24
  },
25
  portfolio_id: {
26
+ allowNull: true,
27
  type: Sequelize.BIGINT,
28
  },
29
  building_id: {
30
+ allowNull: true,
31
  type: Sequelize.BIGINT,
32
  },
33
  unit_id: {
34
+ allowNull: true,
35
  type: Sequelize.BIGINT,
36
  },
37
  status: {
src/models/pwWorkOrders.ts CHANGED
@@ -37,19 +37,19 @@ PwWorkOrders.init(
37
  },
38
  location: {
39
  type: DataTypes.STRING,
40
- allowNull: false,
41
  },
42
  portfolio_id: {
43
  type: DataTypes.BIGINT,
44
- allowNull: false,
45
  },
46
  building_id: {
47
  type: DataTypes.BIGINT,
48
- allowNull: false,
49
  },
50
  unit_id: {
51
  type: DataTypes.BIGINT,
52
- allowNull: false,
53
  },
54
  status: {
55
  type: DataTypes.STRING,
 
37
  },
38
  location: {
39
  type: DataTypes.STRING,
40
+ allowNull: true,
41
  },
42
  portfolio_id: {
43
  type: DataTypes.BIGINT,
44
+ allowNull: true,
45
  },
46
  building_id: {
47
  type: DataTypes.BIGINT,
48
+ allowNull: true,
49
  },
50
  unit_id: {
51
  type: DataTypes.BIGINT,
52
+ allowNull: true,
53
  },
54
  status: {
55
  type: DataTypes.STRING,