add more fields to device data
This commit is contained in:
parent
e78f8befa1
commit
b5e9f2dd9b
|
@ -12,7 +12,7 @@ func (s Service) GetDevicePermissionsByToken(token string) (doc StaffDevicePermi
|
|||
ctx := context.Background()
|
||||
|
||||
stm, args, _ := s.Builder.
|
||||
Select("dm.id, s.account_type, sr.permissions").
|
||||
Select("dm.id AS device_id, s.id, s.name, s.account_type, sr.permissions").
|
||||
From(fmt.Sprintf("%s AS dm", TableDeviceMngt)).
|
||||
Join(fmt.Sprintf("LEFT JOIN %s s ON s.id = dm.owner_id", TableStaff)).
|
||||
Join(fmt.Sprintf("LEFT JOIN %s sr ON s.role_id = sr.id", TableStaffRole)).
|
||||
|
|
Loading…
Reference in New Issue