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_COOKIE_EXPIRE=30
APP_CODE=MBN
APP_CODE=POS
ADMIN_USERNAME=bcsa

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

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

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

Loading…
Cancel
Save