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

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();
