Skip to content

Commit

Permalink
fix: repo-emergency
Browse files Browse the repository at this point in the history
  • Loading branch information
ThuongHoai081 committed Feb 24, 2024
1 parent 5565b88 commit c2b09af
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
import { DataRepository } from 'packages/restBuilder/core/dataHandler';

class Repository extends DataRepository {
findBy(column, value) {
return this.query()
.whereNull('emergencies.deleted_at')
.where(`emergencies.${column}`, value)
.select(
'help_signals.id',
'help_signals.latitude',
'help_signals.longitude',
'help_signals.location',
'help_signals.description',
'help_signals.quantity',
'help_signals.images',
'help_signals.status_id',
'help_signals.user_id',
'help_signals.emergency_id',
'emergencies.type',
{ phoneNumber: 'users.phone_number' },
{ fullName: 'users.full_name' },
{ createdAt: 'help_signals.created_at' },
{ updatedAt: 'help_signals.updated_at' },
{ deletedAt: 'help_signals.deleted_at' },
);

}

getAllEmergency() {
return this.query()
.select(
Expand Down

0 comments on commit c2b09af

Please sign in to comment.