Blame view

apps/models/index.js 2.1 KB
1 2
'use strict';
3 4
const shelljs = require('shelljs');
const config = require('../../config/config');
姜枫 authored
5
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
const ServerModel = require('./server');
const BuildingModel = require('./building');
const ProjectModel = require('./project');
const DeployModel = require('./deploy');
const RestartModel = require('./restart');
const DeleteRestartModel = require('./delete_restart');
const UserModel = require('./user');
const HotfixModel = require('./hotfix');
const OperationLoggerModel = require('./operation_logger');
const PageCacheModel = require('./page_cache');
const CdnCacheModel = require('./cdn_cache');
const ProductCacheModel = require('./product_cache');
const TempProductImportModel = require('./temp_product_import');
const MemcachedHostModel = require('./memcached_host');
const DegradeModel = require('./degrade');
const DegradeServerModel = require('./degrade_server');
沈志敏 authored
22 23
const ChecklistModel = require('./checklist');
const ChecklogsModel = require('./checklogs');
姜枫 authored
24 25 26 27 28 29 30

shelljs.mkdir('-p', config.dbDir);

const Server = new ServerModel();
const Building = new BuildingModel();
const Project = new ProjectModel();
const DeployInfo = new DeployModel();
沈志敏 authored
31
const RestartInfo = new RestartModel();
32
const DeleteRestartInfo = new DeleteRestartModel();
姜枫 authored
33
const User = new UserModel();
姜枫 authored
34 35
const Hotfix = new HotfixModel();
const OperationLogger = new OperationLoggerModel();
陈峰 authored
36
const PageCache = new PageCacheModel();
陈峰 authored
37 38
const CdnCache = new CdnCacheModel();
const ProductCache = new ProductCacheModel();
39
const TempProductImport = new TempProductImportModel();
姜枫 authored
40
const MemcachedHost = new MemcachedHostModel();
xuqi authored
41
const Degrade = new DegradeModel();
xuqi authored
42
const DegradeServer = new DegradeServerModel();
沈志敏 authored
43 44
const Checklist = new ChecklistModel();
const Checklogs = new ChecklogsModel();
姜枫 authored
45 46

User.init();
陈峰 authored
47
PageCache.init();
陈峰 authored
48 49
CdnCache.init();
ProductCache.init();
姜枫 authored
50
xuqi authored
51 52
Degrade.init();
53
module.exports = {
姜枫 authored
54 55 56
    Server,
    Building,
    Project,
姜枫 authored
57
    DeployInfo,
姜枫 authored
58 59
    User,
    Hotfix,
陈峰 authored
60
    OperationLogger,
陈峰 authored
61 62
    PageCache,
    CdnCache,
陈峰 authored
63
    ProductCache,
64
    TempProductImport,
65
    MemcachedHost,
66
    RestartInfo,
67
    DeleteRestartInfo,
xuqi authored
68
    Degrade,
沈志敏 authored
69 70 71
    DegradeServer,
    Checklist,
    Checklogs
姜枫 authored
72
};