github.com/saadullahsaeed/fragmenta-cms@v1.5.4/src/users/users.go (about) 1 // Package users represents the user resource 2 package users 3 4 import ( 5 "time" 6 7 "github.com/fragmenta/fragmenta-cms/src/lib/resource" 8 "github.com/fragmenta/fragmenta-cms/src/lib/status" 9 ) 10 11 // User handles saving and retreiving users from the database 12 type User struct { 13 // resource.Base defines behaviour and fields shared between all resources 14 resource.Base 15 16 // status.ResourceStatus defines a status field and associated behaviour 17 status.ResourceStatus 18 19 // Authorisation 20 Role int64 21 22 // Authentication 23 PasswordHash string 24 PasswordResetToken string 25 PasswordResetAt time.Time 26 27 // User details 28 Email string 29 Name string 30 Title string 31 Summary string 32 Text string 33 ImageID int64 34 }