import type { DataModel, NewDataModel } from '@imengyu/js-request-transform';
import { CommonContentApi, GetContentListItem, GetContentListParams } from '../CommonContent';
import type { QueryParams } from '@imengyu/imengyu-utils';

export class MoveableContentApi extends CommonContentApi {

  constructor() {
    super(undefined, 1, "文物保护-可移动文物");
  }

  getContentList<T extends DataModel = GetContentListItem>(params: GetContentListParams, page: number, pageSize?: number, modelClassCreator?: NewDataModel, querys?: QueryParams): Promise<{ list: T[]; total: number; }> {
    return super.getContentList(params, page, pageSize, modelClassCreator, { 
      ...querys,
      movable: 1
    });
  }
}

export default new MoveableContentApi();
