2020-01-02 13:44:51 +00:00
|
|
|
const crudModel = {
|
|
|
|
_data: [1, 2, 3],
|
2018-08-30 06:50:03 +00:00
|
|
|
data: [],
|
2018-09-14 12:18:39 +00:00
|
|
|
filter: {},
|
|
|
|
order: {},
|
|
|
|
|
2018-08-30 06:50:03 +00:00
|
|
|
insert: () => {
|
2019-04-08 07:01:10 +00:00
|
|
|
return {
|
|
|
|
then: callback => {
|
|
|
|
callback({data: {id: 1234}});
|
|
|
|
}
|
|
|
|
};
|
2018-08-30 06:50:03 +00:00
|
|
|
},
|
|
|
|
remove: () => {
|
2019-04-08 07:01:10 +00:00
|
|
|
return {
|
|
|
|
then: callback => {
|
|
|
|
callback({data: {id: 1234}});
|
|
|
|
}
|
|
|
|
};
|
2018-08-30 06:50:03 +00:00
|
|
|
},
|
|
|
|
save: () => {
|
2019-04-08 07:01:10 +00:00
|
|
|
return {
|
|
|
|
then: callback => {
|
|
|
|
callback({data: {id: 1234}});
|
|
|
|
}
|
|
|
|
};
|
2018-08-30 06:50:03 +00:00
|
|
|
},
|
2019-04-30 07:19:40 +00:00
|
|
|
on: () => {
|
|
|
|
return {
|
|
|
|
then: callback => {
|
|
|
|
callback({data: {id: 1234}});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
2020-01-02 13:44:51 +00:00
|
|
|
refresh: () => {
|
|
|
|
return {
|
|
|
|
then: callback => {
|
|
|
|
return callback({data: {id: 1234}});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
addFilter: () => {
|
|
|
|
return {
|
|
|
|
then: callback => {
|
|
|
|
return callback({data: {id: 1234}});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
applyFilter: () => {
|
|
|
|
crudModel.data = crudModel._data;
|
|
|
|
return {
|
|
|
|
then: callback => {
|
|
|
|
return callback({data: {id: 1234}});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
2018-08-30 06:50:03 +00:00
|
|
|
};
|
2020-01-02 13:44:51 +00:00
|
|
|
|
|
|
|
module.exports = crudModel;
|