Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
User timestamps (#28)
Browse files Browse the repository at this point in the history
* Add created_at to user

* Add updated_at to user

* Add last_login to user
  • Loading branch information
SimonBarendse authored and alexkappa committed Dec 13, 2018
1 parent 98ed4c6 commit 900def1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion management/user.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package management

import "encoding/json"
import (
"encoding/json"
"time"
)

type User struct {

Expand All @@ -23,6 +26,15 @@ type User struct {
// for users to be added to SMS connections.
PhoneNumber *string `json:"phone_number,omitempty"`

// The time the user is created.
CreatedAt *time.Time `json:"created_at,omitempty"`

// The last time the user is updated.
UpdatedAt *time.Time `json:"updated_at,omitempty"`

// The last time the user has logged in.
LastLogin *time.Time `json:"last_login,omitempty"`

// UserMetadata holds data that the user has read/write access to (e.g.
// color_preference, blog_url, etc).
UserMetadata map[string]interface{} `json:"user_metadata,omitempty"`
Expand Down

0 comments on commit 900def1

Please sign in to comment.