index.js
1.79 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import shelljs from 'shelljs';
import config from '../../config/config';
import ServerModel from './server';
import BuildingModel from './building';
import ProjectModel from './project';
import DeployModel from './deploy';
import RestartModel from './restart';
import DeleteRestartModel from './delete_restart';
import UserModel from './user';
import HotfixModel from './hotfix';
import OperationLoggerModel from './operation_logger';
import PageCacheModel from './page_cache';
import CdnCacheModel from './cdn_cache';
import ProductCacheModel from './product_cache';
import TempProductImportModel from './temp_product_import';
import MemcachedHostModel from './memcached_host';
import DegradeModel from './degrade';
import DegradeServerModel from './degrade_server';
shelljs.mkdir('-p', config.dbDir);
const Server = new ServerModel();
const Building = new BuildingModel();
const Project = new ProjectModel();
const DeployInfo = new DeployModel();
const RestartInfo = new RestartModel();
const DeleteRestartInfo = new DeleteRestartModel();
const User = new UserModel();
const Hotfix = new HotfixModel();
const OperationLogger = new OperationLoggerModel();
const PageCache = new PageCacheModel();
const CdnCache = new CdnCacheModel();
const ProductCache = new ProductCacheModel();
const TempProductImport = new TempProductImportModel();
const MemcachedHost = new MemcachedHostModel();
const Degrade = new DegradeModel();
const DegradeServer = new DegradeServerModel();
User.init();
PageCache.init();
CdnCache.init();
ProductCache.init();
Degrade.init();
export {
Server,
Building,
Project,
DeployInfo,
User,
Hotfix,
OperationLogger,
PageCache,
CdnCache,
ProductCache,
TempProductImport,
MemcachedHost,
RestartInfo,
DeleteRestartInfo,
Degrade,
DegradeServer
};