From 9e5d8ebe9c620b2b86798fdf08a94b0ca5c4bbd9 Mon Sep 17 00:00:00 2001 From: Nam Huynh Date: Sat, 21 Aug 2021 19:49:54 +0700 Subject: [PATCH] add more fields to device data --- model.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/model.go b/model.go index b09288b..1f9513a 100644 --- a/model.go +++ b/model.go @@ -1,6 +1,10 @@ package devicemngt -import "time" +import ( + "time" + + "github.com/lib/pq" +) // Device ... type Device struct { @@ -58,10 +62,10 @@ type HeaderData struct { // StaffPermissions ... type StaffPermissions struct { - ID string `db:"id"` - Name string `db:"name"` - Permissions []string `db:"permissions"` - AccountType string `db:"account_type"` - Active bool `db:"active"` - DeviceID string `db:"device_id"` + ID string `db:"id"` + Name string `db:"name"` + Permissions pq.StringArray `db:"permissions"` + AccountType string `db:"account_type"` + Active bool `db:"active"` + DeviceID string `db:"device_id"` }