@kipicore/dbcore 1.1.614 → 1.1.615
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 +162 -0
- package/dist/constants/app.js +187 -1
- package/dist/constants/errorMessages.d.ts +48 -0
- package/dist/constants/errorMessages.js +57 -1
- package/dist/constants/successMessages.d.ts +48 -0
- package/dist/constants/successMessages.js +57 -1
- package/dist/db/psql/migrations/20260626000001-create_account_financial_years.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000001-create_account_financial_years.js +68 -0
- package/dist/db/psql/migrations/20260626000002-create_account_period_locks.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000002-create_account_period_locks.js +71 -0
- package/dist/db/psql/migrations/20260626000003-create_account_number_sequences.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000003-create_account_number_sequences.js +66 -0
- package/dist/db/psql/migrations/20260626000004-create_account_groups.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000004-create_account_groups.js +72 -0
- package/dist/db/psql/migrations/20260626000005-create_account_ledgers.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000005-create_account_ledgers.js +84 -0
- package/dist/db/psql/migrations/20260626000006-create_account_ledger_openings.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000006-create_account_ledger_openings.js +66 -0
- package/dist/db/psql/migrations/20260626000007-create_account_cost_centers.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000007-create_account_cost_centers.js +73 -0
- package/dist/db/psql/migrations/20260626000008-create_account_voucher_types.d.ts +2 -0
- package/dist/db/psql/migrations/20260626000008-create_account_voucher_types.js +70 -0
- package/dist/interfaces/accountCostCenterInterface.d.ts +13 -0
- package/dist/interfaces/accountCostCenterInterface.js +2 -0
- package/dist/interfaces/accountFinancialYearInterface.d.ts +13 -0
- package/dist/interfaces/accountFinancialYearInterface.js +2 -0
- package/dist/interfaces/accountGroupInterface.d.ts +13 -0
- package/dist/interfaces/accountGroupInterface.js +2 -0
- package/dist/interfaces/accountLedgerInterface.d.ts +16 -0
- package/dist/interfaces/accountLedgerInterface.js +2 -0
- package/dist/interfaces/accountLedgerOpeningInterface.d.ts +12 -0
- package/dist/interfaces/accountLedgerOpeningInterface.js +2 -0
- package/dist/interfaces/accountNumberSequenceInterface.d.ts +11 -0
- package/dist/interfaces/accountNumberSequenceInterface.js +2 -0
- package/dist/interfaces/accountPeriodLockInterface.d.ts +11 -0
- package/dist/interfaces/accountPeriodLockInterface.js +2 -0
- package/dist/interfaces/accountVoucherTypeInterface.d.ts +12 -0
- package/dist/interfaces/accountVoucherTypeInterface.js +2 -0
- package/dist/interfaces/index.d.ts +10 -0
- package/dist/interfaces/index.js +10 -0
- package/dist/models/psql/accountCostCenterModel.d.ts +23 -0
- package/dist/models/psql/accountCostCenterModel.js +86 -0
- package/dist/models/psql/accountFinancialYearModel.d.ts +23 -0
- package/dist/models/psql/accountFinancialYearModel.js +81 -0
- package/dist/models/psql/accountGroupModel.d.ts +23 -0
- package/dist/models/psql/accountGroupModel.js +83 -0
- package/dist/models/psql/accountLedgerModel.d.ts +26 -0
- package/dist/models/psql/accountLedgerModel.js +98 -0
- package/dist/models/psql/accountLedgerOpeningModel.d.ts +22 -0
- package/dist/models/psql/accountLedgerOpeningModel.js +77 -0
- package/dist/models/psql/accountNumberSequenceModel.d.ts +21 -0
- package/dist/models/psql/accountNumberSequenceModel.js +74 -0
- package/dist/models/psql/accountPeriodLockModel.d.ts +21 -0
- package/dist/models/psql/accountPeriodLockModel.js +73 -0
- package/dist/models/psql/accountVoucherTypeModel.d.ts +22 -0
- package/dist/models/psql/accountVoucherTypeModel.js +69 -0
- package/dist/models/psql/index.d.ts +8 -0
- package/dist/models/psql/index.js +17 -1
- package/dist/types/accountCostCenterType.d.ts +3 -0
- package/dist/types/accountCostCenterType.js +2 -0
- package/dist/types/accountFinancialYearType.d.ts +3 -0
- package/dist/types/accountFinancialYearType.js +2 -0
- package/dist/types/accountGroupType.d.ts +3 -0
- package/dist/types/accountGroupType.js +2 -0
- package/dist/types/accountLedgerOpeningType.d.ts +3 -0
- package/dist/types/accountLedgerOpeningType.js +2 -0
- package/dist/types/accountLedgerType.d.ts +3 -0
- package/dist/types/accountLedgerType.js +2 -0
- package/dist/types/accountNumberSequenceType.d.ts +3 -0
- package/dist/types/accountNumberSequenceType.js +2 -0
- package/dist/types/accountPeriodLockType.d.ts +3 -0
- package/dist/types/accountPeriodLockType.js +2 -0
- package/dist/types/accountVoucherTypeType.d.ts +3 -0
- package/dist/types/accountVoucherTypeType.js +2 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_financial_years', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
name: {
|
|
13
|
+
type: Sequelize.STRING(255),
|
|
14
|
+
allowNull: false,
|
|
15
|
+
},
|
|
16
|
+
start_date: {
|
|
17
|
+
type: Sequelize.DATE,
|
|
18
|
+
allowNull: false,
|
|
19
|
+
},
|
|
20
|
+
end_date: {
|
|
21
|
+
type: Sequelize.DATE,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
is_active: {
|
|
25
|
+
type: Sequelize.BOOLEAN,
|
|
26
|
+
allowNull: false,
|
|
27
|
+
defaultValue: true,
|
|
28
|
+
},
|
|
29
|
+
is_closed: {
|
|
30
|
+
type: Sequelize.BOOLEAN,
|
|
31
|
+
allowNull: false,
|
|
32
|
+
defaultValue: false,
|
|
33
|
+
},
|
|
34
|
+
status: {
|
|
35
|
+
type: Sequelize.STRING(50),
|
|
36
|
+
allowNull: false,
|
|
37
|
+
defaultValue: 'ACTIVE',
|
|
38
|
+
},
|
|
39
|
+
created_by: {
|
|
40
|
+
type: Sequelize.UUID,
|
|
41
|
+
allowNull: true,
|
|
42
|
+
},
|
|
43
|
+
updated_by: {
|
|
44
|
+
type: Sequelize.UUID,
|
|
45
|
+
allowNull: true,
|
|
46
|
+
},
|
|
47
|
+
deleted_by: {
|
|
48
|
+
type: Sequelize.UUID,
|
|
49
|
+
allowNull: true,
|
|
50
|
+
},
|
|
51
|
+
created_at: {
|
|
52
|
+
allowNull: false,
|
|
53
|
+
type: Sequelize.DATE,
|
|
54
|
+
},
|
|
55
|
+
updated_at: {
|
|
56
|
+
allowNull: false,
|
|
57
|
+
type: Sequelize.DATE,
|
|
58
|
+
},
|
|
59
|
+
deleted_at: {
|
|
60
|
+
allowNull: true,
|
|
61
|
+
type: Sequelize.DATE,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
async down(queryInterface, Sequelize) {
|
|
66
|
+
await queryInterface.dropTable('account_financial_years');
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_period_locks', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
financial_year_id: {
|
|
13
|
+
type: Sequelize.UUID,
|
|
14
|
+
allowNull: false,
|
|
15
|
+
},
|
|
16
|
+
period_month: {
|
|
17
|
+
type: Sequelize.INTEGER,
|
|
18
|
+
allowNull: false,
|
|
19
|
+
},
|
|
20
|
+
period_year: {
|
|
21
|
+
type: Sequelize.INTEGER,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
is_locked: {
|
|
25
|
+
type: Sequelize.BOOLEAN,
|
|
26
|
+
allowNull: false,
|
|
27
|
+
defaultValue: false,
|
|
28
|
+
},
|
|
29
|
+
locked_by: {
|
|
30
|
+
type: Sequelize.UUID,
|
|
31
|
+
allowNull: true,
|
|
32
|
+
},
|
|
33
|
+
locked_at: {
|
|
34
|
+
type: Sequelize.DATE,
|
|
35
|
+
allowNull: true,
|
|
36
|
+
},
|
|
37
|
+
status: {
|
|
38
|
+
type: Sequelize.STRING(50),
|
|
39
|
+
allowNull: false,
|
|
40
|
+
defaultValue: 'ACTIVE',
|
|
41
|
+
},
|
|
42
|
+
created_by: {
|
|
43
|
+
type: Sequelize.UUID,
|
|
44
|
+
allowNull: true,
|
|
45
|
+
},
|
|
46
|
+
updated_by: {
|
|
47
|
+
type: Sequelize.UUID,
|
|
48
|
+
allowNull: true,
|
|
49
|
+
},
|
|
50
|
+
deleted_by: {
|
|
51
|
+
type: Sequelize.UUID,
|
|
52
|
+
allowNull: true,
|
|
53
|
+
},
|
|
54
|
+
created_at: {
|
|
55
|
+
allowNull: false,
|
|
56
|
+
type: Sequelize.DATE,
|
|
57
|
+
},
|
|
58
|
+
updated_at: {
|
|
59
|
+
allowNull: false,
|
|
60
|
+
type: Sequelize.DATE,
|
|
61
|
+
},
|
|
62
|
+
deleted_at: {
|
|
63
|
+
allowNull: true,
|
|
64
|
+
type: Sequelize.DATE,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
async down(queryInterface, Sequelize) {
|
|
69
|
+
await queryInterface.dropTable('account_period_locks');
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_number_sequences', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
voucher_type: {
|
|
13
|
+
type: Sequelize.STRING(50),
|
|
14
|
+
allowNull: false,
|
|
15
|
+
},
|
|
16
|
+
financial_year_id: {
|
|
17
|
+
type: Sequelize.UUID,
|
|
18
|
+
allowNull: false,
|
|
19
|
+
},
|
|
20
|
+
prefix: {
|
|
21
|
+
type: Sequelize.STRING(255),
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
current_number: {
|
|
25
|
+
type: Sequelize.INTEGER,
|
|
26
|
+
allowNull: false,
|
|
27
|
+
},
|
|
28
|
+
padding: {
|
|
29
|
+
type: Sequelize.INTEGER,
|
|
30
|
+
allowNull: false,
|
|
31
|
+
},
|
|
32
|
+
status: {
|
|
33
|
+
type: Sequelize.STRING(50),
|
|
34
|
+
allowNull: false,
|
|
35
|
+
defaultValue: 'ACTIVE',
|
|
36
|
+
},
|
|
37
|
+
created_by: {
|
|
38
|
+
type: Sequelize.UUID,
|
|
39
|
+
allowNull: true,
|
|
40
|
+
},
|
|
41
|
+
updated_by: {
|
|
42
|
+
type: Sequelize.UUID,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
},
|
|
45
|
+
deleted_by: {
|
|
46
|
+
type: Sequelize.UUID,
|
|
47
|
+
allowNull: true,
|
|
48
|
+
},
|
|
49
|
+
created_at: {
|
|
50
|
+
allowNull: false,
|
|
51
|
+
type: Sequelize.DATE,
|
|
52
|
+
},
|
|
53
|
+
updated_at: {
|
|
54
|
+
allowNull: false,
|
|
55
|
+
type: Sequelize.DATE,
|
|
56
|
+
},
|
|
57
|
+
deleted_at: {
|
|
58
|
+
allowNull: true,
|
|
59
|
+
type: Sequelize.DATE,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
async down(queryInterface, Sequelize) {
|
|
64
|
+
await queryInterface.dropTable('account_number_sequences');
|
|
65
|
+
}
|
|
66
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_groups', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
parent_group_id: {
|
|
13
|
+
type: Sequelize.UUID,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
},
|
|
16
|
+
group_code: {
|
|
17
|
+
type: Sequelize.STRING(100),
|
|
18
|
+
allowNull: false,
|
|
19
|
+
unique: true,
|
|
20
|
+
},
|
|
21
|
+
group_name: {
|
|
22
|
+
type: Sequelize.STRING(255),
|
|
23
|
+
allowNull: false,
|
|
24
|
+
},
|
|
25
|
+
nature: {
|
|
26
|
+
type: Sequelize.STRING(50),
|
|
27
|
+
allowNull: false,
|
|
28
|
+
},
|
|
29
|
+
normal_balance: {
|
|
30
|
+
type: Sequelize.STRING(50),
|
|
31
|
+
allowNull: false,
|
|
32
|
+
},
|
|
33
|
+
is_system: {
|
|
34
|
+
type: Sequelize.BOOLEAN,
|
|
35
|
+
allowNull: false,
|
|
36
|
+
defaultValue: false,
|
|
37
|
+
},
|
|
38
|
+
status: {
|
|
39
|
+
type: Sequelize.STRING(50),
|
|
40
|
+
allowNull: false,
|
|
41
|
+
defaultValue: 'ACTIVE',
|
|
42
|
+
},
|
|
43
|
+
created_by: {
|
|
44
|
+
type: Sequelize.UUID,
|
|
45
|
+
allowNull: true,
|
|
46
|
+
},
|
|
47
|
+
updated_by: {
|
|
48
|
+
type: Sequelize.UUID,
|
|
49
|
+
allowNull: true,
|
|
50
|
+
},
|
|
51
|
+
deleted_by: {
|
|
52
|
+
type: Sequelize.UUID,
|
|
53
|
+
allowNull: true,
|
|
54
|
+
},
|
|
55
|
+
created_at: {
|
|
56
|
+
allowNull: false,
|
|
57
|
+
type: Sequelize.DATE,
|
|
58
|
+
},
|
|
59
|
+
updated_at: {
|
|
60
|
+
allowNull: false,
|
|
61
|
+
type: Sequelize.DATE,
|
|
62
|
+
},
|
|
63
|
+
deleted_at: {
|
|
64
|
+
allowNull: true,
|
|
65
|
+
type: Sequelize.DATE,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
async down(queryInterface, Sequelize) {
|
|
70
|
+
await queryInterface.dropTable('account_groups');
|
|
71
|
+
}
|
|
72
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_ledgers', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
group_id: {
|
|
13
|
+
type: Sequelize.UUID,
|
|
14
|
+
allowNull: false,
|
|
15
|
+
},
|
|
16
|
+
ledger_code: {
|
|
17
|
+
type: Sequelize.STRING(100),
|
|
18
|
+
allowNull: false,
|
|
19
|
+
unique: true,
|
|
20
|
+
},
|
|
21
|
+
ledger_name: {
|
|
22
|
+
type: Sequelize.STRING(255),
|
|
23
|
+
allowNull: false,
|
|
24
|
+
},
|
|
25
|
+
ledger_type: {
|
|
26
|
+
type: Sequelize.STRING(50),
|
|
27
|
+
allowNull: false,
|
|
28
|
+
},
|
|
29
|
+
normal_balance: {
|
|
30
|
+
type: Sequelize.STRING(50),
|
|
31
|
+
allowNull: false,
|
|
32
|
+
},
|
|
33
|
+
entity_type: {
|
|
34
|
+
type: Sequelize.STRING(50),
|
|
35
|
+
allowNull: true,
|
|
36
|
+
},
|
|
37
|
+
entity_id: {
|
|
38
|
+
type: Sequelize.UUID,
|
|
39
|
+
allowNull: true,
|
|
40
|
+
},
|
|
41
|
+
bank_account_id: {
|
|
42
|
+
type: Sequelize.UUID,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
},
|
|
45
|
+
allow_manual_posting: {
|
|
46
|
+
type: Sequelize.BOOLEAN,
|
|
47
|
+
allowNull: false,
|
|
48
|
+
defaultValue: true,
|
|
49
|
+
},
|
|
50
|
+
status: {
|
|
51
|
+
type: Sequelize.STRING(50),
|
|
52
|
+
allowNull: false,
|
|
53
|
+
defaultValue: 'ACTIVE',
|
|
54
|
+
},
|
|
55
|
+
created_by: {
|
|
56
|
+
type: Sequelize.UUID,
|
|
57
|
+
allowNull: true,
|
|
58
|
+
},
|
|
59
|
+
updated_by: {
|
|
60
|
+
type: Sequelize.UUID,
|
|
61
|
+
allowNull: true,
|
|
62
|
+
},
|
|
63
|
+
deleted_by: {
|
|
64
|
+
type: Sequelize.UUID,
|
|
65
|
+
allowNull: true,
|
|
66
|
+
},
|
|
67
|
+
created_at: {
|
|
68
|
+
allowNull: false,
|
|
69
|
+
type: Sequelize.DATE,
|
|
70
|
+
},
|
|
71
|
+
updated_at: {
|
|
72
|
+
allowNull: false,
|
|
73
|
+
type: Sequelize.DATE,
|
|
74
|
+
},
|
|
75
|
+
deleted_at: {
|
|
76
|
+
allowNull: true,
|
|
77
|
+
type: Sequelize.DATE,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
async down(queryInterface, Sequelize) {
|
|
82
|
+
await queryInterface.dropTable('account_ledgers');
|
|
83
|
+
}
|
|
84
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_ledger_openings', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
ledger_id: {
|
|
13
|
+
type: Sequelize.UUID,
|
|
14
|
+
allowNull: false,
|
|
15
|
+
},
|
|
16
|
+
financial_year_id: {
|
|
17
|
+
type: Sequelize.UUID,
|
|
18
|
+
allowNull: false,
|
|
19
|
+
},
|
|
20
|
+
opening_balance: {
|
|
21
|
+
type: Sequelize.DECIMAL(15, 2),
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
balance_type: {
|
|
25
|
+
type: Sequelize.STRING(50),
|
|
26
|
+
allowNull: false,
|
|
27
|
+
},
|
|
28
|
+
opening_date: {
|
|
29
|
+
type: Sequelize.DATEONLY,
|
|
30
|
+
allowNull: false,
|
|
31
|
+
},
|
|
32
|
+
status: {
|
|
33
|
+
type: Sequelize.STRING(50),
|
|
34
|
+
allowNull: false,
|
|
35
|
+
defaultValue: 'ACTIVE',
|
|
36
|
+
},
|
|
37
|
+
created_by: {
|
|
38
|
+
type: Sequelize.UUID,
|
|
39
|
+
allowNull: true,
|
|
40
|
+
},
|
|
41
|
+
updated_by: {
|
|
42
|
+
type: Sequelize.UUID,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
},
|
|
45
|
+
deleted_by: {
|
|
46
|
+
type: Sequelize.UUID,
|
|
47
|
+
allowNull: true,
|
|
48
|
+
},
|
|
49
|
+
created_at: {
|
|
50
|
+
allowNull: false,
|
|
51
|
+
type: Sequelize.DATE,
|
|
52
|
+
},
|
|
53
|
+
updated_at: {
|
|
54
|
+
allowNull: false,
|
|
55
|
+
type: Sequelize.DATE,
|
|
56
|
+
},
|
|
57
|
+
deleted_at: {
|
|
58
|
+
allowNull: true,
|
|
59
|
+
type: Sequelize.DATE,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
async down(queryInterface, Sequelize) {
|
|
64
|
+
await queryInterface.dropTable('account_ledger_openings');
|
|
65
|
+
}
|
|
66
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_cost_centers', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
institute_id: {
|
|
13
|
+
type: Sequelize.UUID,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
},
|
|
16
|
+
academic_calendar_id: {
|
|
17
|
+
type: Sequelize.UUID,
|
|
18
|
+
allowNull: true,
|
|
19
|
+
},
|
|
20
|
+
parent_cost_center_id: {
|
|
21
|
+
type: Sequelize.UUID,
|
|
22
|
+
allowNull: true,
|
|
23
|
+
},
|
|
24
|
+
code: {
|
|
25
|
+
type: Sequelize.STRING,
|
|
26
|
+
allowNull: true,
|
|
27
|
+
},
|
|
28
|
+
name: {
|
|
29
|
+
type: Sequelize.STRING,
|
|
30
|
+
allowNull: true,
|
|
31
|
+
},
|
|
32
|
+
type: {
|
|
33
|
+
type: Sequelize.STRING,
|
|
34
|
+
allowNull: true,
|
|
35
|
+
},
|
|
36
|
+
ref_type: {
|
|
37
|
+
type: Sequelize.STRING,
|
|
38
|
+
allowNull: true,
|
|
39
|
+
},
|
|
40
|
+
ref_id: {
|
|
41
|
+
type: Sequelize.UUID,
|
|
42
|
+
allowNull: true,
|
|
43
|
+
},
|
|
44
|
+
created_by: {
|
|
45
|
+
type: Sequelize.UUID,
|
|
46
|
+
allowNull: true,
|
|
47
|
+
},
|
|
48
|
+
updated_by: {
|
|
49
|
+
type: Sequelize.UUID,
|
|
50
|
+
allowNull: true,
|
|
51
|
+
},
|
|
52
|
+
deleted_by: {
|
|
53
|
+
type: Sequelize.UUID,
|
|
54
|
+
allowNull: true,
|
|
55
|
+
},
|
|
56
|
+
created_at: {
|
|
57
|
+
allowNull: false,
|
|
58
|
+
type: Sequelize.DATE,
|
|
59
|
+
},
|
|
60
|
+
updated_at: {
|
|
61
|
+
allowNull: false,
|
|
62
|
+
type: Sequelize.DATE,
|
|
63
|
+
},
|
|
64
|
+
deleted_at: {
|
|
65
|
+
allowNull: true,
|
|
66
|
+
type: Sequelize.DATE,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
async down(queryInterface, Sequelize) {
|
|
71
|
+
await queryInterface.dropTable('account_cost_centers');
|
|
72
|
+
}
|
|
73
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.createTable('account_voucher_types', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.UUID,
|
|
8
|
+
defaultValue: Sequelize.UUIDV4,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
institute_id: {
|
|
13
|
+
type: Sequelize.UUID,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
},
|
|
16
|
+
academic_calendar_id: {
|
|
17
|
+
type: Sequelize.UUID,
|
|
18
|
+
allowNull: true,
|
|
19
|
+
},
|
|
20
|
+
code: {
|
|
21
|
+
type: Sequelize.STRING,
|
|
22
|
+
allowNull: true,
|
|
23
|
+
},
|
|
24
|
+
name: {
|
|
25
|
+
type: Sequelize.STRING,
|
|
26
|
+
allowNull: true,
|
|
27
|
+
},
|
|
28
|
+
prefix: {
|
|
29
|
+
type: Sequelize.STRING,
|
|
30
|
+
allowNull: true,
|
|
31
|
+
},
|
|
32
|
+
numbering_pattern: {
|
|
33
|
+
type: Sequelize.STRING,
|
|
34
|
+
allowNull: true,
|
|
35
|
+
},
|
|
36
|
+
requires_approval: {
|
|
37
|
+
type: Sequelize.BOOLEAN,
|
|
38
|
+
allowNull: true,
|
|
39
|
+
defaultValue: false,
|
|
40
|
+
},
|
|
41
|
+
created_by: {
|
|
42
|
+
type: Sequelize.UUID,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
},
|
|
45
|
+
updated_by: {
|
|
46
|
+
type: Sequelize.UUID,
|
|
47
|
+
allowNull: true,
|
|
48
|
+
},
|
|
49
|
+
deleted_by: {
|
|
50
|
+
type: Sequelize.UUID,
|
|
51
|
+
allowNull: true,
|
|
52
|
+
},
|
|
53
|
+
created_at: {
|
|
54
|
+
allowNull: false,
|
|
55
|
+
type: Sequelize.DATE,
|
|
56
|
+
},
|
|
57
|
+
updated_at: {
|
|
58
|
+
allowNull: false,
|
|
59
|
+
type: Sequelize.DATE,
|
|
60
|
+
},
|
|
61
|
+
deleted_at: {
|
|
62
|
+
allowNull: true,
|
|
63
|
+
type: Sequelize.DATE,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
async down(queryInterface, Sequelize) {
|
|
68
|
+
await queryInterface.dropTable('account_voucher_types');
|
|
69
|
+
}
|
|
70
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AccountCostCenterType } from '../constants/app';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
+
export interface IAccountCostCenterModelAttributes extends IDefaultAttributes {
|
|
4
|
+
id: string;
|
|
5
|
+
instituteId: string;
|
|
6
|
+
academicCalendarId: string;
|
|
7
|
+
parentCostCenterId: string | null;
|
|
8
|
+
code: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: AccountCostCenterType;
|
|
11
|
+
refType: string | null;
|
|
12
|
+
refId: string | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
2
|
+
import { COMMAN_STATUS } from '../constants/app';
|
|
3
|
+
export interface IAccountFinancialYearModelAttributes extends IDefaultAttributes {
|
|
4
|
+
id: string;
|
|
5
|
+
instituteId: string;
|
|
6
|
+
academicCalendarId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
startDate: Date;
|
|
9
|
+
endDate: Date;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
isClosed: boolean;
|
|
12
|
+
status: COMMAN_STATUS;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AccountNature, AccountNormalBalance } from '../constants/app';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
+
export interface IAccountGroupModelAttributes extends IDefaultAttributes {
|
|
4
|
+
id: string;
|
|
5
|
+
instituteId: string;
|
|
6
|
+
academicCalendarId: string;
|
|
7
|
+
parentGroupId?: string | null;
|
|
8
|
+
groupCode: string;
|
|
9
|
+
groupName: string;
|
|
10
|
+
nature: AccountNature;
|
|
11
|
+
normalBalance: AccountNormalBalance;
|
|
12
|
+
isSystem: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AccountLedgerType, AccountNormalBalance } from '../constants/app';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
+
export interface IAccountLedgerModelAttributes extends IDefaultAttributes {
|
|
4
|
+
id: string;
|
|
5
|
+
instituteId: string;
|
|
6
|
+
academicCalendarId: string;
|
|
7
|
+
groupId: string;
|
|
8
|
+
ledgerCode: string;
|
|
9
|
+
ledgerName: string;
|
|
10
|
+
ledgerType: AccountLedgerType;
|
|
11
|
+
normalBalance: AccountNormalBalance;
|
|
12
|
+
entityType?: string | null;
|
|
13
|
+
entityId?: string | null;
|
|
14
|
+
bankAccountId?: string | null;
|
|
15
|
+
allowManualPosting: boolean;
|
|
16
|
+
}
|