development
Visoth 9 months ago
parent e804cd1da6
commit e889a860d7
  1. 2
      Config/config.env
  2. 2
      Controller/App_Versions.js
  3. 2
      Model/BC_Data.js
  4. 23
      Model/User.js

@ -5,7 +5,7 @@ BEARER_HEADER=jdkewowjs@#Dfjsdkk3er@sfdgsdfgwer231
JWT_EXPIRE=7d JWT_EXPIRE=7d
JWT_COOKIE_EXPIRE=30 JWT_COOKIE_EXPIRE=30
APP_CODE=MBN APP_CODE=POS
ADMIN_USERNAME=bcsa ADMIN_USERNAME=bcsa

@ -8,7 +8,7 @@ exports.getAppVersion = AsyncHandler(async (req, res, next) => {
try { try {
const appVersions = await AppVersion.findOne({ const appVersions = await AppVersion.findOne({
where: { where: {
app_name: "MBN", // temporary change to MBN app_name: "POS", // temporary change to MBN
status: 1, status: 1,
} }
}); });

@ -5,7 +5,7 @@ const db = require("../Config/db");
// what is this use for ? // what is this use for ?
const DataModel = db.define( const DataModel = db.define(
"BCDATA", "TDDATA",
{ {
ID: { ID: {
type: sequelize.INTEGER, type: sequelize.INTEGER,

@ -6,27 +6,30 @@ const jwt = require("jsonwebtoken")
const UserModel = db.define( const UserModel = db.define(
"TDUSERS", "TDUSERS",
{ {
USER_ID: {
type: sequelize.INTEGER,
primaryKey: true,
},
USER_CODE: { USER_CODE: {
type: sequelize.STRING, type: sequelize.STRING,
primaryKey: true,
}, },
USER_NAME: { USER_NAME: {
type: sequelize.STRING, type: sequelize.STRING,
}, },
USER_PASS: { USER_DESC: {
type: sequelize.STRING, type: sequelize.STRING,
}, },
USER_DESC: { FIRST_NAME: {
type: sequelize.STRING, type: sequelize.STRING,
}, },
USER_CPAS: { LAST_NAME: {
type: sequelize.STRING, type: sequelize.STRING,
}, },
USER_STAT: { ADDRESS: {
type: sequelize.CHAR, type: sequelize.STRING,
}, },
USER_LOG: { PHONE: {
type: sequelize.CHAR, type: sequelize.STRING,
}, },
EMAIL: { EMAIL: {
type: sequelize.STRING, type: sequelize.STRING,
@ -38,10 +41,10 @@ const UserModel = db.define(
type: sequelize.STRING, type: sequelize.STRING,
}, },
USER_STATUS: { USER_STATUS: {
type: sequelize.CHAR, // 1 = Active, 0 = Inactive type: sequelize.CHAR,
}, },
USER_TYPE: { USER_TYPE: {
type: sequelize.CHAR, // S = Sale , U = User, D = Delivery , C = Customer type: sequelize.CHAR,
}, },
USER_LOG: { USER_LOG: {
type: sequelize.STRING, type: sequelize.STRING,

Loading…
Cancel
Save