From 70cb1d7c117abe236f16cfbf385a047f04c5dedf Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 5 Feb 2024 11:51:03 +0700 Subject: [PATCH] fix total omg_053 and add "createAt","lastUpdateAt","createFullname" 7controller --- .../{BloodGroupController.ts => OrgBloodGroupController.ts} | 3 ++- src/controllers/OrgEducationLevelController.ts | 3 ++- src/controllers/OrgGenderController.ts | 3 ++- src/controllers/PrefixController.ts | 3 ++- src/controllers/RankController.ts | 3 ++- src/controllers/RelationshipController.ts | 3 ++- src/controllers/ReligionController.ts | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) rename src/controllers/{BloodGroupController.ts => OrgBloodGroupController.ts} (97%) diff --git a/src/controllers/BloodGroupController.ts b/src/controllers/OrgBloodGroupController.ts similarity index 97% rename from src/controllers/BloodGroupController.ts rename to src/controllers/OrgBloodGroupController.ts index b2b768b7..ecb23b3e 100644 --- a/src/controllers/BloodGroupController.ts +++ b/src/controllers/OrgBloodGroupController.ts @@ -156,7 +156,8 @@ import { @Get() async listBloodGroup() { const bloodGroup = await this.bloodGroupRepository.find({ - select: ["id", "name" ], + select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName"], + order:{ createdAt:"ASC" } }); if (!bloodGroup) { diff --git a/src/controllers/OrgEducationLevelController.ts b/src/controllers/OrgEducationLevelController.ts index b168f72c..a4692d30 100644 --- a/src/controllers/OrgEducationLevelController.ts +++ b/src/controllers/OrgEducationLevelController.ts @@ -156,7 +156,8 @@ export class EducationLevelController extends Controller { @Get() async listEducationLevel() { const educationLevel = await this.educationLevelRepository.find({ - select: ["id", "name" ], + select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName"], + order:{ createdAt:"ASC" } }); if (!educationLevel) { diff --git a/src/controllers/OrgGenderController.ts b/src/controllers/OrgGenderController.ts index 727fcc54..0e24f8a9 100644 --- a/src/controllers/OrgGenderController.ts +++ b/src/controllers/OrgGenderController.ts @@ -41,7 +41,8 @@ export class GenderController extends Controller { async GetResult() { console.log("asds") const _gender = await this.genderRepository.find({ - select: ["id", "name"], + select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName"], + order:{ createdAt:"ASC" } }); if (!_gender) { return new HttpSuccess([]); diff --git a/src/controllers/PrefixController.ts b/src/controllers/PrefixController.ts index 8fd37aa4..8d528d79 100644 --- a/src/controllers/PrefixController.ts +++ b/src/controllers/PrefixController.ts @@ -40,7 +40,8 @@ export class PrefixController extends Controller { @Get() async Get() { const _prefix = await this.prefixRepository.find({ - select: ["id", "name"], + select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName"], + order:{ createdAt:"ASC" } }); if (!_prefix) { return new HttpSuccess([]); diff --git a/src/controllers/RankController.ts b/src/controllers/RankController.ts index 3cb690fb..cc7ca481 100644 --- a/src/controllers/RankController.ts +++ b/src/controllers/RankController.ts @@ -156,7 +156,8 @@ import { @Get() async listRank() { const rank = await this.rankRepository.find({ - select: ["id", "name" ], + select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName"], + order:{ createdAt:"ASC" } }); if (!rank) { diff --git a/src/controllers/RelationshipController.ts b/src/controllers/RelationshipController.ts index cf6ae0bf..7720b970 100644 --- a/src/controllers/RelationshipController.ts +++ b/src/controllers/RelationshipController.ts @@ -156,7 +156,8 @@ export class RelationshipController extends Controller { @Get() async listRelationship() { const relationship = await this.relationshipRepository.find({ - select: ["id", "name"], + select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName"], + order:{ createdAt:"ASC" } }); if (!relationship) { return new HttpSuccess([]); diff --git a/src/controllers/ReligionController.ts b/src/controllers/ReligionController.ts index 692e03e9..43265940 100644 --- a/src/controllers/ReligionController.ts +++ b/src/controllers/ReligionController.ts @@ -156,7 +156,8 @@ export class ReligionController extends Controller { @Get() async listReligion() { const religion = await this.religionRepository.find({ - select: ["id", "name" ], + select: ["id", "name" , "createdAt" , "lastUpdatedAt" , "createdFullName"], + order:{ createdAt:"ASC" } }); if (!religion) {