index.js 1.1 KB
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 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';

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

const Server = new ServerModel();
const Building = new BuildingModel();
const Project = new ProjectModel();
const DeployInfo = new DeployModel();
const User = new UserModel();
const Hotfix = new HotfixModel();
const OperationLogger = new OperationLoggerModel();
const PageCache = new PageCacheModel();
const CdnCache = new CdnCacheModel();
const ProductCache = new ProductCacheModel();

User.init();
PageCache.init();
CdnCache.init();
ProductCache.init();

export {
    Server,
    Building,
    Project,
    DeployInfo,
    User,
    Hotfix,
    OperationLogger,
    PageCache,
    CdnCache,
    ProductCache
};