This commit is contained in:
2026-09-24 15:51:47 +05:30
parent cf3e4ea159
commit 299871b820
6 changed files with 356 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ type PartnerService interface {
GetActiveRiders(partnerid, aid, uid, tid int) ([]models.RiderInfo, error)
GetPartners(aid, pid, uid int) ([]models.Partnerinfo, error)
GetRiderShifts(aid int) ([]models.Ridershifts, error)
CreateRiderShift(shift models.Ridershifts) (models.Ridershifts, error)
GetLocationConfig(uid, cid int) ([]models.Locationconfigs, error)
GetRiderLogs(pid, aid int, fdate, tdate string) ([]models.RiderlogDetails, error)
GetRiderInfo(userid int) (models.RiderInfo, error)
@@ -48,6 +49,17 @@ func (s *partnerService) GetRiderShifts(aid int) ([]models.Ridershifts, error) {
return s.repo.GetRiderShifts(aid)
}
// CreateRiderShift opens a working window in a region.
//
// The counterpart the table never had. `CreateRider` refuses a rider with no
// shift, so a region shipped without shift rows could not be given a rider from
// the product at all — the dropdown said "No shifts set up for this region" and
// that was the end of it.
func (s *partnerService) CreateRiderShift(shift models.Ridershifts) (models.Ridershifts, error) {
return s.repo.CreateRiderShift(shift)
}
func (s *partnerService) GetLocationConfig(uid, cid int) ([]models.Locationconfigs, error) {
return s.repo.GetLocationConfig(uid, cid)