package com.ffii.core.common.web;

import java.time.LocalDateTime;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.v3.oas.annotations.Operation;

@RestController
@RequestMapping("/public")
public class CommonPublicController {

	@Operation(summary = "get system current time")
	@GetMapping("/now")
	public TimeRes now() {
		return new TimeRes(LocalDateTime.now());
	}

	public static class TimeRes {
		private LocalDateTime time;

		public TimeRes() {
		}

		public TimeRes(LocalDateTime time) {
			this.time = time;
		}

		public LocalDateTime getTime() {
			return time;
		}

		public void setTime(LocalDateTime time) {
			this.time = time;
		}

	}
}
