You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: DocumentModel.go
    path of file: ./repos/DocHub/models
    
    the code of the file until where you have to start completion: package models

import (
	"fmt"
	"strings"

	"github.com/TruthHun/DocHub/helper"

	"errors"

	"strconv"

	"github.com/astaxie/beego/orm"
)

//文档资源状态，1正常，0文档未转换成功，-1删除，同时把id录入文档回收站id，-2表示删除了文档文件，但是数据库记录还保留。
    
func (this *Document) GetDocInfoForElasticSearch(page, pageSize int, startTime int, fields ...string) (infos []DocumentInfo, rows int64, err error) {
	if len(fields) == 0 {
		fields = append(fields, "Id")
	}
	rows, err = orm.NewOrm().QueryTable(GetTableDocumentInfo()).Filter("Status__gte", 0).Filter("TimeUpdate__gte", startTime).Limit(pageSize).Offset((page-1)*pageSize).All(&infos, fields...)
	return
}