add duty-time and poi (จาก google maps ไปก่อน)

This commit is contained in:
Suphonchai Phoonsawat 2023-11-09 14:35:08 +07:00
parent 43932f742b
commit 78f8c0813c
30 changed files with 3395 additions and 4 deletions

View file

@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Command.Service.DTOs.DutyTime
{
public class CreateDutyTimeDto
{
[Required, Comment("คำอธิบาย")]
public string Description { get; set; } = string.Empty;
[Required, Comment("เวลาเข้างานช่วงเช้า")]
public string StartTimeMorning { get; set; } = "00:00";
[Required, Comment("เวลาออกงานช่วงเช้า")]
public string EndTimeMorning { get; set; } = "00:00";
[Required, Comment("เวลาเข้างานช่วงบ่าย")]
public string StartTimeAfternoon { get; set; } = "00:00";
[Required, Comment("เวลาออกงานช่วงบ่าย")]
public string EndTimeAfternoon { get; set; } = "00:00";
[Required, Comment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)")]
public bool IsDefault { get; set; } = false;
}
}

View file

@ -0,0 +1,17 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace BMA.EHR.Command.Service.DTOs.DutyTime
{
public class UpdateDutyTimeDto
{
[Required, Comment("คำอธิบาย")]
public string Description { get; set; } = string.Empty;
[Required, Comment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)")]
public bool IsDefault { get; set; } = false;
[Required, Comment("สถานะการเปิดใช้งาน (เปิด/ปิด)")]
public bool IsActive { get; set; } = true;
}
}

View file

@ -0,0 +1,9 @@
namespace BMA.EHR.Command.Service.DTOs.POI
{
public class GetPOIDto
{
public double Lat { get; set; } = 0;
public double Lon { get; set; } = 0;
}
}

View file

@ -0,0 +1,28 @@
namespace BMA.EHR.Command.Service.DTOs.POI
{
public class GetPOIResultDto
{
public List<POIItem> results { get; set; } = new List<POIItem>();
}
public class POIItem
{
public string place_id { get; set; } = string.Empty;
public string name { get; set; } = string.Empty;
public GeometryItem geometry { get; set; } = new();
}
public class GeometryItem
{
public LocationItem location { get; set; } = new();
}
public class LocationItem
{
public double lat { get; set; } = 0;
public double lng { get; set; } = 0;
}
}

View file

@ -0,0 +1,13 @@
namespace BMA.EHR.Command.Service.DTOs.POI
{
public class POIResultDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public double Latitude { get; set; } = 0;
public double Longitude { get; set; } = 0;
}
}