zet-lib 1.2.66 → 1.2.68

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.
@@ -297,6 +297,9 @@ const generate = async (req, res) => {
297
297
  CREATE TABLE ${table} (
298
298
  id BIGSERIAL PRIMARY KEY,
299
299
  company_id BIGINT NOT NULL,
300
+ lock smallint default 0,
301
+ approval_status smallint DEFAULT 1,
302
+ approval_history jsonb[] DEFAULT NULL,
300
303
  updated_by BIGINT DEFAULT NULL,
301
304
  created_by BIGINT DEFAULT NULL,
302
305
  created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
@@ -1150,6 +1153,9 @@ router.post('/import', async (req, res) => {
1150
1153
  data.company_id = 1
1151
1154
  data.created_by = res.locals.userId || 1
1152
1155
  data.updated_by = res.locals.userId || 1
1156
+ data.created_at = Util.now()
1157
+ data.updated_at = Util.now()
1158
+ delete data.approval_history
1153
1159
  const results = await connection.results({
1154
1160
  table: 'zfields',
1155
1161
  where: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.2.66",
3
+ "version": "1.2.68",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"