summaryrefslogtreecommitdiff
path: root/app/domain/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/domain/user.go')
-rw-r--r--app/domain/user.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/app/domain/user.go b/app/domain/user.go
new file mode 100644
index 0000000..aae17f6
--- /dev/null
+++ b/app/domain/user.go
@@ -0,0 +1,34 @@
+package domain
+
+type User struct {
+ ID ID `json:"id" jsonapi:"primary,users"`
+ Username string `json:"username" jsonapi:"attr,username"`
+ Email string `json:"email" jsonapi:"attr,email"`
+ ProfileURL string `json:"profile" jsonapi:"attr,profile"`
+ Picture string `json:"picture" jsonapi:"attr,picture"`
+}
+
+func NewUser() *User {
+ return &User{}
+}
+
+func (u *User) GetID() ID {
+ return u.ID
+}
+
+func (u *User) SetID(id ID) error {
+ u.ID = id
+ return nil
+}
+
+func (u *User) Validate() error {
+ return nil
+}
+
+func (self *User) Sparkle(sparklee string, reason string) *Sparkle {
+ return &Sparkle{
+ Sparklee: sparklee,
+ Author: self,
+ Reason: reason,
+ }
+}