'use strict';
angular.module('qrzk.service', ['ngResource'])
.factory('Batch',function($resource,$cacheFactory){
	var cache = $cacheFactory('currentBatch');
    return $resource('batch/:id',{id:'@id'},{
        'get': { method: 'GET', cache: cache}
    });
})
.factory('Province',function($resource){
    return $resource('province');
})
//用户收藏
.factory('UserMark',function($resource){
    return $resource('usermark/:id',{id:'@id'});
})
//批次类型
.factory('BatchType', function($resource, $cacheFactory) {
    var cache = $cacheFactory('batchType');
    return $resource('dict/batchType',{
        'query': { method: 'GET', cache: cache, isArray: true }
    });
})
//试卷纸型
.factory('PaperType', function($resource, $cacheFactory) {
    var cache = $cacheFactory('paperType');
    return $resource('dict/paperType',{
        'query': { method: 'GET', cache: cache, isArray: true }
    });
});