package org.springblade.smartapplication.carenterrecord.dto;

import lombok.Data;

@Data
public class QueryDto {
	private String carNnm;
	private String dateOfEnter;
	private String dateOfOut;
	private String tid;
	private Integer current;
	private Integer size;

	public static final class QueryDtoBuilder {
		private String carNnm;
		private String dateOfEnter;
		private String dateOfOut;
		private String tid;
		private Integer current;
		private Integer size;

		public QueryDtoBuilder() {
		}

		public static QueryDtoBuilder aQueryDto() {
			return new QueryDtoBuilder();
		}

		public QueryDtoBuilder withCarNnm(String carNnm) {
			this.carNnm = carNnm;
			return this;
		}

		public QueryDtoBuilder withDateOfEnter(String dateOfEnter) {
			this.dateOfEnter = dateOfEnter;
			return this;
		}

		public QueryDtoBuilder withDateOfOut(String dateOfOut) {
			this.dateOfOut = dateOfOut;
			return this;
		}

		public QueryDtoBuilder withTid(String tid) {
			this.tid = tid;
			return this;
		}

		public QueryDtoBuilder withCurrent(Integer current) {
			this.current = current;
			return this;
		}

		public QueryDtoBuilder withSize(Integer size) {
			this.size = size;
			return this;
		}

		public QueryDto build() {
			QueryDto queryDto = new QueryDto();
			queryDto.setCarNnm(carNnm);
			queryDto.setDateOfEnter(dateOfEnter);
			queryDto.setDateOfOut(dateOfOut);
			queryDto.setTid(tid);
			queryDto.setCurrent(current);
			queryDto.setSize(size);
			return queryDto;
		}
	}
}
