@kipicore/dbcore 1.1.649 → 1.1.651
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.
- package/dist/constants/app.d.ts +4 -0
- package/dist/constants/app.js +6 -1
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.d.ts +2 -0
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.js +19 -0
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.d.ts +2 -0
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.js +19 -0
- package/dist/interfaces/categoriesInterface.d.ts +2 -1
- package/dist/interfaces/subCategoriesInterface.d.ts +2 -1
- package/dist/models/mongodb/productMetaModel.js +8 -0
- package/dist/models/psql/SubCategoriesModel.d.ts +2 -1
- package/dist/models/psql/SubCategoriesModel.js +5 -0
- package/dist/models/psql/categoriesModel.d.ts +2 -1
- package/dist/models/psql/categoriesModel.js +5 -0
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -1837,6 +1837,10 @@ export declare enum APK_TYPE {
|
|
|
1837
1837
|
STUDENT_DEMO = "STUDENT_DEMO",
|
|
1838
1838
|
PLAYGROUP_DEMO = "PLAYGROUP_DEMO"
|
|
1839
1839
|
}
|
|
1840
|
+
export declare enum CATEGORY_TYPE {
|
|
1841
|
+
INVENTORY = "INVENTORY",
|
|
1842
|
+
VENDOR = "VENDOR"
|
|
1843
|
+
}
|
|
1840
1844
|
export declare enum AI_MODEL_KEYS {
|
|
1841
1845
|
MASTER_PASSWORD = "MASTER_PASSWORD"
|
|
1842
1846
|
}
|
package/dist/constants/app.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.EXAM_ANSWER_SHEET_QUESTION_RESULT = exports.PAYMENT_TERMS_TYPE = exports
|
|
|
5
5
|
exports.PROJECT_ASSESSMENT_OPTION_STATUS = exports.USER_BOOK_ASSESSMENT_STATUS = exports.BOOK_ASSESSMENT_DATE_STATUS = exports.TASK_MANAGEMENT_STATUS = exports.USER_DETAILS_FILED = exports.DEVICE_TYPE = exports.templateKeyWord = exports.bankAccountRegexMap = exports.EMAIL_SUBJECTS = exports.PDF_TEMPLATES = exports.EMAIL_TEMPLATES = exports.PINCODE_API_URL = exports.APPLE_AUTH = exports.META_AUTH = exports.GOOGLE_AUTH = exports.API_URL = exports.DEFAULT_USER_LOGO = exports.DEFAULT_INSTITUTED_LOGO = exports.UPLOAD_PATH = exports.SVG_URL_PATH = exports.TO_DO_STATUS = exports.LECTURE_TITLE = exports.LECTURE_STATUS = exports.SCHOOL_INFORMATION_STEP = exports.CASTE = exports.RELIGION_CASTE = exports.NATIONALITY = exports.CATEGORY = exports.IS_PRINCIPAL = exports.FEE_TYPE = exports.BOOLEAN_STATUS = exports.PROPERTY_STATUS = exports.DESIGNATION_OF_PERSON = exports.TRUST_REGISTERED_UNDER = exports.TRUST_TYPE = exports.SVA_NAME = exports.QDC_NAME = exports.USER_PAYOUT_TYPE = exports.PARENTS_CHILDREN_CURRENT = exports.CHAPTER_INDEX_FILE_TYPE = exports.FEE_HISTORY_STATUS = exports.USER_CHAPTER_INDEX_STATUS = exports.CHAPTER_INDEX_TYPE = exports.IMAGE__NAME = exports.INQUIRY_STATUS = exports.INQUIRY_REFERRED_BY = exports.EXAM_GROUP_STANDARD_RESULT = exports.EXAM_GROUP_STATUS = exports.SUBJECT_INDEX_TYPE = exports.LECTURE_SLOT_DURATION = void 0;
|
|
6
6
|
exports.COMPETITION_EVENTS = exports.PAYMENT_STATUS = exports.INCOME_EXPENSE_SOURCE = exports.INCOME_EXPENSE_TYPE = exports.APPOINTMENT_STATUS = exports.MAINTENANCE_MODULE_NAME = exports.MAINTENANCE_TYPE = exports.MAINTENANCE_MODE = exports.ASSIGN_FILE_TYPE = exports.LOST_FOUND_ITEM_STATUS = exports.PAYMENT_PROCESSING_CALLBACK_URL = exports.PAYMENT_PROCESSING_PAGE_URL = exports.PAYMENT_PROCESSING_STATUS_URL = exports.WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = exports.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = exports.PAYMENT_METHODS = exports.PAYMENT_GATEWAY_TYPES = exports.JOB_ACTION = exports.ONE_GB_BYTES = exports.CHARGE_PER_TRANSACTION_ITEM_UNIT = exports.INSTITUTE_SUBSCRIPTION_PLAN_STATUS = exports.WALLET_TRANSACTION_USERS_TYPE = exports.WALLET_HISTORY_STATUS = exports.WALLET_HISTORY_ACTION = exports.WALLET_HISTORY_ITEM_TYPE = exports.WALLET_HISTORY_TYPE = exports.REPLACE_TEACHER_STATUS = exports.TEACHER_TYPE = exports.INVOICE_TYPE = exports.PURCHASE_STATUS = exports.COLUMN_LIST_TITLE = exports.INVOICE_PAYMENT_TYPE = exports.PDF_CHEQUE_FREQUENCY = exports.PDF_CHEQUE_STATUS = exports.LANGUAGES = exports.HOME_WORK_STATUS = exports.SOCKET_EVENTS = exports.SUBSCRIPTION_PLAN_FILES_TYPE = exports.VALID_CURRENCY = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_PLAN_CHARGE_INTERVAL = exports.DISCOUNT_TYPE = exports.CONTACT_FEED_BACK_TYPE = exports.PLANNER_SYNC_STATUS = exports.RMS_NOTIFICATION_DAYS = exports.NOTIFICATION_ACTION = exports.ONLINE_EXAM_NOTIFICATION_TYPE = exports.NOTIFICATION_MODULE_TYPE = exports.NOTIFICATION_STATUS = exports.NOTIFICATION_TYPE = void 0;
|
|
7
7
|
exports.RMS_PRIORITY = exports.RMS_APPROVAL_STATUS = exports.RMS_TRANSACTION_TYPE = exports.RMS_RESOURCE_UNIT = exports.RMS_RESOURCE_TYPE = exports.RMS_ASSET_CONDITION = exports.CERTIFICATE_REQUEST_TYPE = exports.CERTIFICATE_REQUEST_STATUS = exports.FEE_SUBMISSION_STATUS = exports.VIDEO_DIRECTION_TYPE = exports.VIDEO_EVENT_TYPE = exports.USER_HAS_PENALTY_TITLE = exports.USER_HAS_PENALTY_TYPE = exports.PAYOUT_STATUS = exports.NOTICEBOARD_STATUS = exports.NOTICEBOARD_TYPE = exports.PERMISSION_TYPE = exports.NOTIFICATION_SEND_STATUS = exports.MEMBERSHIP_STATUS = exports.COMMUNITY_TYPE = exports.DESIGNATION_TYPE = exports.ADDITIONAL_PAYOUT_TYPE = exports.POSTAL_DISPATCH_STATUS = exports.CALL_TYPE = exports.SEARCH_TYPE = exports.REPORT_TYPE = exports.DEVICE_TYPE_APP_ANALYTICS = exports.APP_ANALYTICS_EVENT_TYPE = exports.EXPORT_SHEET_TYPE = exports.GRANT_AND_DONATION_TYPE = exports.TICKET_RAISE_PRIORITY = exports.TICKET_RAISE_STATUS = exports.TERM_AND_CONDITION_STATUS = exports.EDUCATION_OFFICER_TYPE = exports.HOME_WORK_TYPE = exports.STUDENT_FEE_PROCESS_STATUS = exports.FEE_COLLECTION_TYPE = exports.BANK_ACCOUNT_TYPE = exports.STUDENT_LEAVE_TYPE = exports.STUDENT_LEAVE_STATUS = exports.CERTIFICATE_TYPE = exports.CERTIFICATE_FOR = exports.SHEET_TYPE = exports.COMPETITION_USER_ROLE = exports.RESULT_STATUS = exports.COMPETITION_STATUS = exports.STATUS_BY_PARENTS = exports.COMPETITION_TYPE = exports.CAMPUS_CARNIVAL_STATUS = exports.COMPETITION_TYPE_CATEGORY = void 0;
|
|
8
|
-
exports.AI_MODEL_KEY_TYPES = exports.AI_MODEL_KEYS = exports.APK_TYPE = exports.AccountAuditAction = exports.AccountBudgetType = exports.AccountTaxDirection = exports.AccountFundType = exports.AccountSyncAction = exports.AccountIntegrationProvider = exports.AccountApprovalActionType = exports.AccountDepreciationMethod = exports.AccountMatchStatus = exports.AccountExpensePaymentStatus = exports.AccountPaymentMode = exports.AccountVoucherTypeCode = exports.AccountCostCenterRefType = exports.AccountCostCenterType = exports.AccountPartyMode = exports.AccountPartyType = exports.AccountSourceModule = exports.AccountPostingEventStatus = exports.AccountBalanceType = exports.AccountApprovalStatus = exports.AccountVoucherStatus = exports.AccountLedgerType = exports.AccountNormalBalance = exports.AccountNature = exports.CONTACT_INTEREST_STATUS = exports.CONTACT_INTEREST_TYPE = exports.RMS_EXPENSE_TYPE = exports.RMS_DIGITAL_STATUS = exports.RMS_BOOKING_STATUS = exports.RMS_TICKET_PRIORITY = exports.RMS_TICKET_STATUS = exports.REFUND_ENTITY_TYPE = exports.REFUND_STATUS = exports.FINAL_RESULT_TYPE = exports.FINAL_RESULT = exports.GRADE = exports.RMS_STOCK_SCOPE = exports.RMS_AUDIT_ACTION = exports.RMS_ASSET_LIFECYCLE = exports.RMS_PO_FULFILLMENT_STATUS = exports.RMS_GRN_ACTION_TYPE = void 0;
|
|
8
|
+
exports.AI_MODEL_KEY_TYPES = exports.AI_MODEL_KEYS = exports.CATEGORY_TYPE = exports.APK_TYPE = exports.AccountAuditAction = exports.AccountBudgetType = exports.AccountTaxDirection = exports.AccountFundType = exports.AccountSyncAction = exports.AccountIntegrationProvider = exports.AccountApprovalActionType = exports.AccountDepreciationMethod = exports.AccountMatchStatus = exports.AccountExpensePaymentStatus = exports.AccountPaymentMode = exports.AccountVoucherTypeCode = exports.AccountCostCenterRefType = exports.AccountCostCenterType = exports.AccountPartyMode = exports.AccountPartyType = exports.AccountSourceModule = exports.AccountPostingEventStatus = exports.AccountBalanceType = exports.AccountApprovalStatus = exports.AccountVoucherStatus = exports.AccountLedgerType = exports.AccountNormalBalance = exports.AccountNature = exports.CONTACT_INTEREST_STATUS = exports.CONTACT_INTEREST_TYPE = exports.RMS_EXPENSE_TYPE = exports.RMS_DIGITAL_STATUS = exports.RMS_BOOKING_STATUS = exports.RMS_TICKET_PRIORITY = exports.RMS_TICKET_STATUS = exports.REFUND_ENTITY_TYPE = exports.REFUND_STATUS = exports.FINAL_RESULT_TYPE = exports.FINAL_RESULT = exports.GRADE = exports.RMS_STOCK_SCOPE = exports.RMS_AUDIT_ACTION = exports.RMS_ASSET_LIFECYCLE = exports.RMS_PO_FULFILLMENT_STATUS = exports.RMS_GRN_ACTION_TYPE = void 0;
|
|
9
9
|
const env_1 = require("../configs/env");
|
|
10
10
|
exports.SIXTY = 60;
|
|
11
11
|
exports.ONE_HUNDRED = 100;
|
|
@@ -2195,6 +2195,11 @@ var APK_TYPE;
|
|
|
2195
2195
|
APK_TYPE["STUDENT_DEMO"] = "STUDENT_DEMO";
|
|
2196
2196
|
APK_TYPE["PLAYGROUP_DEMO"] = "PLAYGROUP_DEMO";
|
|
2197
2197
|
})(APK_TYPE || (exports.APK_TYPE = APK_TYPE = {}));
|
|
2198
|
+
var CATEGORY_TYPE;
|
|
2199
|
+
(function (CATEGORY_TYPE) {
|
|
2200
|
+
CATEGORY_TYPE["INVENTORY"] = "INVENTORY";
|
|
2201
|
+
CATEGORY_TYPE["VENDOR"] = "VENDOR";
|
|
2202
|
+
})(CATEGORY_TYPE || (exports.CATEGORY_TYPE = CATEGORY_TYPE = {}));
|
|
2198
2203
|
var AI_MODEL_KEYS;
|
|
2199
2204
|
(function (AI_MODEL_KEYS) {
|
|
2200
2205
|
AI_MODEL_KEYS["MASTER_PASSWORD"] = "MASTER_PASSWORD";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
up: async (queryInterface, Sequelize) => {
|
|
4
|
+
const table = await queryInterface.describeTable('categories');
|
|
5
|
+
if (!table.type) {
|
|
6
|
+
await queryInterface.addColumn('categories', 'type', {
|
|
7
|
+
type: Sequelize.STRING,
|
|
8
|
+
allowNull: true,
|
|
9
|
+
defaultValue: 'INVENTORY',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
const table = await queryInterface.describeTable('categories');
|
|
15
|
+
if (table.type) {
|
|
16
|
+
await queryInterface.removeColumn('categories', 'type');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
up: async (queryInterface, Sequelize) => {
|
|
4
|
+
const table = await queryInterface.describeTable('sub_categories');
|
|
5
|
+
if (!table.type) {
|
|
6
|
+
await queryInterface.addColumn('sub_categories', 'type', {
|
|
7
|
+
type: Sequelize.STRING,
|
|
8
|
+
allowNull: true,
|
|
9
|
+
defaultValue: 'INVENTORY',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
down: async (queryInterface, Sequelize) => {
|
|
14
|
+
const table = await queryInterface.describeTable('sub_categories');
|
|
15
|
+
if (table.type) {
|
|
16
|
+
await queryInterface.removeColumn('sub_categories', 'type');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IDefaultAttributes } from './commonInterface';
|
|
2
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
2
|
+
import { CATEGORY_TYPE, COMMAN_STATUS } from '../constants/app';
|
|
3
3
|
export interface ICategoriesModelAttributes extends IDefaultAttributes {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
status: COMMAN_STATUS;
|
|
7
7
|
instituteId?: string;
|
|
8
|
+
type?: CATEGORY_TYPE;
|
|
8
9
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { IDefaultAttributes } from './commonInterface';
|
|
2
|
-
import { COMMAN_STATUS } from '../constants/app';
|
|
2
|
+
import { CATEGORY_TYPE, COMMAN_STATUS } from '../constants/app';
|
|
3
3
|
export interface ISubCategoriesModelAttributes extends IDefaultAttributes {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
categoryId: string;
|
|
7
7
|
instituteId?: string;
|
|
8
8
|
status: COMMAN_STATUS;
|
|
9
|
+
type: CATEGORY_TYPE;
|
|
9
10
|
}
|
|
@@ -83,6 +83,14 @@ const ProductMetaSchema = new mongoose_1.Schema({
|
|
|
83
83
|
enum: Object.values(constants_1.PRODUCT_META_STATUS),
|
|
84
84
|
default: constants_1.PRODUCT_META_STATUS.ACTIVE,
|
|
85
85
|
},
|
|
86
|
+
description: {
|
|
87
|
+
type: String,
|
|
88
|
+
required: false,
|
|
89
|
+
},
|
|
90
|
+
shortDescription: {
|
|
91
|
+
type: String,
|
|
92
|
+
required: false,
|
|
93
|
+
},
|
|
86
94
|
createdBy: {
|
|
87
95
|
type: String,
|
|
88
96
|
},
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
2
|
import { ISubCategoriesModelAttributes } from '../../interfaces/subCategoriesInterface';
|
|
3
3
|
import { TSubCategoriesModelCreationAttributes } from '../../types/subCategoryType';
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app';
|
|
4
|
+
import { CATEGORY_TYPE, COMMAN_STATUS } from '../../constants/app';
|
|
5
5
|
declare class SubCategoriesModel extends Model<ISubCategoriesModelAttributes, TSubCategoriesModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
8
8
|
status: COMMAN_STATUS;
|
|
9
9
|
instituteId?: string;
|
|
10
|
+
type?: CATEGORY_TYPE;
|
|
10
11
|
createdBy: string;
|
|
11
12
|
updatedBy: string;
|
|
12
13
|
deletedBy: string;
|
|
@@ -90,6 +90,11 @@ SubCategoriesModel.init({
|
|
|
90
90
|
allowNull: true,
|
|
91
91
|
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
92
92
|
},
|
|
93
|
+
type: {
|
|
94
|
+
type: sequelize_1.DataTypes.STRING,
|
|
95
|
+
allowNull: true,
|
|
96
|
+
defaultValue: app_1.CATEGORY_TYPE.INVENTORY,
|
|
97
|
+
}
|
|
93
98
|
}, {
|
|
94
99
|
modelName: 'SubCategoriesModel',
|
|
95
100
|
tableName: 'sub_categories',
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
2
|
import { ICategoriesModelAttributes } from '../../interfaces/categoriesInterface';
|
|
3
3
|
import { TCategoriesModelCreationAttributes } from '../../types/categoriesType';
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app';
|
|
4
|
+
import { CATEGORY_TYPE, COMMAN_STATUS } from '../../constants/app';
|
|
5
5
|
export declare class CategoriesModel extends Model<ICategoriesModelAttributes, TCategoriesModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
8
8
|
status: COMMAN_STATUS;
|
|
9
9
|
instituteId?: string;
|
|
10
|
+
type?: CATEGORY_TYPE;
|
|
10
11
|
createdBy: string;
|
|
11
12
|
updatedBy: string;
|
|
12
13
|
deletedBy: string;
|
|
@@ -51,6 +51,11 @@ CategoriesModel.init({
|
|
|
51
51
|
allowNull: false,
|
|
52
52
|
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
53
53
|
},
|
|
54
|
+
type: {
|
|
55
|
+
type: sequelize_1.DataTypes.STRING,
|
|
56
|
+
allowNull: true,
|
|
57
|
+
defaultValue: app_1.CATEGORY_TYPE.INVENTORY,
|
|
58
|
+
},
|
|
54
59
|
}, {
|
|
55
60
|
modelName: 'CategoriesModel',
|
|
56
61
|
tableName: 'categories',
|
package/package.json
CHANGED