فهرست منبع

♻️ refactor(silver-users): optimize silver talent service imports and query fields

- move Gender, CertificationStatus, JobSeekingStatus imports from entity to DTO file
- remove avatarUrl from query select fields to reduce unnecessary data transfer
yourname 9 ماه پیش
والد
کامیت
a38b4a5f48
1فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 4 3
      src/server/modules/silver-users/silver-talent.service.ts

+ 4 - 3
src/server/modules/silver-users/silver-talent.service.ts

@@ -1,5 +1,6 @@
 import { DataSource, Repository } from 'typeorm';
-import { SilverUserProfile, Gender, CertificationStatus, JobSeekingStatus } from './silver-user-profile.entity';
+import { SilverUserProfile } from './silver-user-profile.entity';
+import { Gender, CertificationStatus, JobSeekingStatus } from './silver-user-profile.dto';
 import { CreateSilverTalentRequest, UpdateSilverTalentRequest, SearchSilverTalentParams } from './silver-talent.dto';
 import debug from 'debug';
 
@@ -114,7 +115,7 @@ export class SilverTalentService {
       relations: ['user'],
       select: [
         'id', 'userId', 'realName', 'nickname', 'organization', 'age', 'gender',
-        'avatarUrl', 'personalIntro', 'personalSkills', 'personalExperience',
+        'personalIntro', 'personalSkills', 'personalExperience',
         'certificationStatus', 'certificationInfo', 'jobSeekingStatus',
         'jobSeekingRequirements', 'totalPoints', 'timeBankHours',
         'knowledgeShareCount', 'knowledgeReadCount', 'knowledgeLikeCount',
@@ -137,7 +138,7 @@ export class SilverTalentService {
       where: { userId },
       select: [
         'id', 'userId', 'realName', 'nickname', 'organization', 'age', 'gender',
-        'phone', 'email', 'avatarUrl', 'personalIntro', 'personalSkills',
+        'phone', 'email', 'personalIntro', 'personalSkills',
         'personalExperience', 'certificationStatus', 'certificationInfo',
         'jobSeekingStatus', 'jobSeekingRequirements', 'totalPoints',
         'resumeCount', 'applicationCount', 'timeBankHours',