-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathdata-source.ts
More file actions
43 lines (41 loc) · 1.59 KB
/
Copy pathdata-source.ts
File metadata and controls
43 lines (41 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { DataSource } from 'typeorm';
import { config } from 'dotenv';
import { User } from './modules/user/entities/user.entity';
import { RefreshToken } from './modules/user/entities/refresh-token.entity';
import { Escrow } from './modules/escrow/entities/escrow.entity';
import { Party } from './modules/escrow/entities/party.entity';
import { Condition } from './modules/escrow/entities/condition.entity';
import { EscrowEvent } from './modules/escrow/entities/escrow-event.entity';
import { Dispute } from './modules/escrow/entities/dispute.entity';
import { Notification } from './notifications/entities/notification.entity';
import { NotificationPreference } from './notifications/entities/notification-preference.entity';
import { ApiKey } from './api-key/entities/api-key.entity';
import { AdminAuditLog } from './modules/admin/entities/admin-audit-log.entity';
import { Webhook } from './modules/webhook/webhook.entity';
import { StellarEvent } from './modules/stellar/entities/stellar-event.entity';
import { AllowedAsset } from './modules/assets/entities/allowed-asset.entity';
import { AuditLog } from './modules/audit-log/entities/audit-log.entity';
config(); // Load .env file
export default new DataSource({
type: 'sqlite',
database: process.env.DATABASE_PATH || './data/vaultix.db',
entities: [
User,
RefreshToken,
Escrow,
Party,
Condition,
EscrowEvent,
Dispute,
Notification,
NotificationPreference,
ApiKey,
AdminAuditLog,
Webhook,
StellarEvent,
AllowedAsset,
AuditLog,
],
migrations: ['./src/migrations/*.ts'],
synchronize: false,
});