hrms-api-backend/BMA.EHR.Application/Responses/Organizations/TreeOrgResponseMap.cs
2023-10-11 11:01:49 +07:00

80 lines
2.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMA.EHR.Application.Responses.Organizations
{
public class TreeOrgResponseMap
{
public Guid? organizationPositionId { get; set; }
public Guid? positionMasterId { get; set; }
public string? positionUserNote { get; set; }
public bool? isCondition { get; set; }
public string? conditionNote { get; set; }
public string? keyId { get; set; }
public Guid? personId { get; set; }
public Guid? profileId { get; set; }
public string? header { get; set; }
public string? avatar { get; set; }
public Guid? organizationId { get; set; }
public string? organizationCode { get; set; }
public string? organizationName { get; set; }
public string? name { get; set; }
public int? order { get; set; }
public string? positionNum { get; set; }
public string? organizationShortName { get; set; }
public string? positionName { get; set; }
public string? positionSideName { get; set; }
public string? executivePosition { get; set; }
public string? executivePositionSide { get; set; }
public string? positionType { get; set; }
public string? positionLevel { get; set; }
public bool? positionLeaderFlag { get; set; }
public bool? lazy { get; set; }
public bool? isActive { get; set; }
public bool? enabled { get; set; }
public int? totalPositionCount { get; set; }
public int? totalPositionVacant { get; set; }
public Guid? organizationParentId { get; set; }
public string OrganizationStatus { get; set; } = "ปกติ";
public string? agency { get; set; }
public string? government { get; set; }
public string? department { get; set; }
public string? pile { get; set; }
public string? governmentCode { get; set; }
public Guid? positionNameId { get; set; }
public Guid? positionNumId { get; set; }
public Guid? positionLineId { get; set; }
public Guid? positionTypeId { get; set; }
public string? positionLine { get; set; }
public Object? positionSideNameObj { get; set; }
public Object? positionLevelObj { get; set; }
public int? positionNumInt
{
get
{
try
{
if (positionNum is null)
return 999 + order ?? 0;
else
{
var i = positionNum.Split(".").Last();
return Convert.ToInt32(i);
}
}
catch (Exception ex) { }
return null;
}
}
}
}