import { UnifiedField } from '<%= props.frameworkImport %>';
<% if (props.isGql) { %>
    import { ObjectType } from '@nestjs/graphql';
<% } %>

import { <%= props.namePascal %> } from '../<%= props.nameKebab %>.model';
<% if (props.isGql) { %>
@ObjectType({ description: 'Result of find and count <%= props.namePascal %>s' })
<% } %>
export class FindAndCount<%= props.namePascal %>sResult {

  @UnifiedField({
    type: () => <%= props.namePascal %>,
    description: 'Found <%= props.namePascal %>s',
  })
  items: <%= props.namePascal %>[];

  @UnifiedField({
    description: 'Total count (skip/offset and limit/take are ignored in the count)',
  })
  totalCount: number;
}
