/**
 * REST API，以端点的形式提供。
 *
 * 若想访问包含页面的内容，请在相应的API后面添加.html。
 */
var APIv1 = {
    Application: {
        Base: '/api/v1/application',

        BadgeNo: '/badge_no'
    },

    Chats: {
        Base: "/api/v1/chats",

        List: "/list",
        ListWithPatient: "/list/patient",
        ListWithDoctor: "/list/doctor",

        Recent: '/recent',
        SearchAboutPatient: '/search/patient',
        SearchAboutDoctor: '/search/doctor',

        // 所有未读消息数
        UnreadMsgCount: '/unread_count',

        // 私信
        PM: '/pm',
        PMUnread: '/pm/unread',
        PMUnreadCount: '/pm/unread/count',
        PMStats: '/pm/statistic',
        PMFinished: '/pm/finished',             // 当前会话是否已经结束

        // 组信
        GM: '/gm',
        GMUnread: '/gm/unread',
        GMUnreadCount: '/gm/unread/count',
        GMStats: '/gm/statistic',

        //系统消息
        SM: '/sm'
    },

    Users: {
        Base: '/api/v1/users',

        Login: '/login',
        Logout: '/logout',

        User: '/:user_id',
        UserStatus: '/:user_id/status'
    },

    Groups: {
        Base: '/api/v1/groups',

        MembersAvatar: '/member/avatars'
    },

    Management: {
        Base: '/api/v1/management',

        Health: '/health',
        DbStatus: '/db'
    },

    Push: {
        Base: '/api/v1/push',

        Getui: '/getui'
    }
};

var pages = {
    Home: {
        Index: '/'
    },

    Socket: {
        Index: '/socket',

        Test: '/test'
    }
};

module.exports.PAGES = pages;
module.exports.APIv1 = APIv1;