import BaseStore from '@src/stores/base';

export default class TextbookStore extends BaseStore {
  listQuestion(params) {
    return this.apiGet('/textbook/question/list', params);
  }

  getQuestion(params) {
    return this.apiGet('/textbook/question/detail', params);
  }

  addQuestion(params) {
    return this.apiPost('/textbook/question/add', params);
  }

  editQuestion(params) {
    return this.apiPut('/textbook/question/edit', params);
  }

  delQuestion(params) {
    return this.apiDel('/textbook/question/delete', params);
  }

  searchNo(params) {
    return this.apiPost('/textbook/search/no', params);
  }

  listPaper(params) {
    return this.apiGet('/textbook/paper/list', params);
  }
}

export const Textbook = new TextbookStore({ key: 'textbook' });
