/*
 * Copyright 2017 EPAM Systems
 *
 *
 * This file is part of EPAM Report Portal.
 * https://github.com/reportportal/commons-dao
 *
 * Report Portal is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Report Portal is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Report Portal.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.epam.ta.reportportal.database.entity.history.status;

import com.epam.ta.reportportal.database.entity.Status;
import com.epam.ta.reportportal.database.entity.item.TestItemType;

import java.io.Serializable;

/**
 * Does not db object. Represents results of query
 * {@link com.epam.ta.reportportal.database.dao.TestItemRepositoryCustom#findMostTimeConsumingTestItems(String, int)}}
 * aggregation query.
 *
 * @author Pavel Bortnik
 */
public class DurationTestItem implements Serializable {

	private String id;

	private String name;

	private String uniqueId;

	private Long duration;

	private Status status;

	private TestItemType type;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUniqueId() {
		return uniqueId;
	}

	public void setUniqueId(String uniqueId) {
		this.uniqueId = uniqueId;
	}

	public Long getDuration() {
		return duration;
	}

	public void setDuration(Long duration) {
		this.duration = duration;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public TestItemType getType() {
		return type;
	}

	public void setType(TestItemType type) {
		this.type = type;
	}
}

@@ -968,16 +968,132 @@
 temType;
+%0Aimport com.epam.ta.reportportal.database.search.Filter;%0Aimport org.springframework.data.mongodb.core.mapping.Field;
 %0A%0Aimport
@@ -1114,16 +1114,39 @@
 lizable;
+%0Aimport java.util.Date;
 %0A%0A/**%0A *
@@ -1298,22 +1298,22 @@
 stItems(
-String
+Filter
 , int)%7D%7D
@@ -1574,16 +1574,72 @@
  type;%0A%0A
+%09@Field(value = %22start_time%22)%0A%09private Date startTime;%0A%0A
 %09public 
@@ -2294,24 +2294,24 @@
 ype type) %7B%0A
-
 %09%09this.type 
@@ -2320,11 +2320,143 @@
 type;%0A%09%7D
+%0A%0A%09public Date getStartTime() %7B%0A%09%09return startTime;%0A%09%7D%0A%0A%09public void setStartTime(Date startTime) %7B%0A%09%09this.startTime = startTime;%0A%09%7D
 %0A%7D%0A

add start time into response for mtc widget