{"size": 984, "ext": "js", "max_stars_repo_path": "public/app/store/CategoryTree.js", "max_stars_repo_name": "PsyduckMans/accountmanager", "max_stars_repo_stars_event_min_datetime": "2015-01-20T13:07:30.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-18T11:12:46.000Z", "max_issues_repo_path": "public/app/store/CategoryTree.js", "max_issues_repo_name": "PsyduckMans/accountmanager", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/app/store/CategoryTree.js", "max_forks_repo_name": "PsyduckMans/accountmanager", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.7419354839, "max_line_length": 95, "alphanum_fraction": 0.625}
/**
 * Account Manager System (https://github.com/PsyduckMans/accountmanager)
 *
 * @link      https://github.com/PsyduckMans/accountmanager for the canonical source repository
 * @copyright Copyright (c) 2014 PsyduckMans (https://ninth.not-bad.org)
 * @license   https://github.com/PsyduckMans/accountmanager/blob/master/LICENSE MIT
 * @author    Psyduck.Mans
 */

Ext.define('AccountManager.store.CategoryTree', {
    extend: 'Ext.data.TreeStore',

    model: 'AccountManager.model.Category',
    root: {Name:'分类', Id:-1, expanded:true},

    proxy: {
        type: 'direct',
        batchActions: false,
        api: {
            read: AccountManager.Direct.Category.list,
            create: AccountManager.Direct.Category.add,
            destroy: AccountManager.Direct.Category.delete,
            update: AccountManager.Direct.Category.edit
        },
        reader: {
            type: 'json',
            root: 'data',
            messageProperty: 'msg'
        }
    }
});