Initial commit

This commit is contained in:
meusinfirmary
2025-04-22 14:31:37 +07:00
commit b7e852126c
115 changed files with 23188 additions and 0 deletions

View File

@ -0,0 +1,36 @@
// const db = require(`../config/dbMysqlConn`);
const MysqlHelpers = require(`../library/LibMysqlHelper`);
class OrdersDropsModels {
// t_orders_drops
static STTS_DROP_WAIT = 1;
static STTS_DROP_DROPPING = 2;
static STTS_DROP_DROPED = 3;
static STTS_DROP_FAIL = 4;
static updt (updtDrop = {}) {
return new Promise(async (resolve, reject) => {
try {
const conn = await MysqlHelpers.createConnection();
await MysqlHelpers.createTrx(conn);
let result = undefined;
if (Object.keys(updtDrop).length > 0) result = await MysqlHelpers.queryTrx(conn, `UPDATE t_orders_drops SET ? WHERE id = ?;`, [updtDrop, updtDrop.id]);
await MysqlHelpers.commit(conn);
resolve({
type: 'success',
result,
})
} catch (err) {
reject(err);
}
})
}
}
module.exports = OrdersDropsModels;