entities into lib
This commit is contained in:
1 parent
b6e13fb4af
commit
256dc78e5b
8 files changed
+36
-60
No files matched your search
@@ -1,12 +0,0 @@
|
||||
package structure
|
||||
|
||||
import "time"
|
||||
|
||||
type Token struct {
|
||||
TableName string `sql:"admin_service.tokens" json:"-"`
|
||||
Id int64 `json:"id"`
|
||||
UserId int64 `json:"userId"`
|
||||
Token string `json:"token"`
|
||||
ExpiredAt *time.Time `json:"expiredAt"`
|
||||
CreatedAt time.Time `json:"createdAt" sql:",null"`
|
||||
}
|
||||
+4
-15
@@ -1,22 +1,11 @@
|
||||
package structure
|
||||
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
TableName string `sql:"admin_service.users" json:"-"`
|
||||
Id int64 `json:"id"`
|
||||
Image string `json:"image"`
|
||||
FirstName string `json:"firstName"`
|
||||
LastName string `json:"lastName"`
|
||||
Email string `json:"email" valid:"required~Required"`
|
||||
Password string `json:"password,omitempty"`
|
||||
Phone string `json:"phone"`
|
||||
UpdatedAt time.Time `json:"updatedAt" sql:",null"`
|
||||
CreatedAt time.Time `json:"createdAt" sql:",null"`
|
||||
}
|
||||
import (
|
||||
"gitlab8.alx/msp2.0/msp-lib/structure"
|
||||
)
|
||||
|
||||
type UsersResponse struct {
|
||||
Items *[]User `json:"items,omitempty"`
|
||||
Items *[]structure.AdminUser `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
type UsersRequest struct {
|
||||
|
||||
Reference in new issue
Block a user