init
This commit is contained in:
10
model/model.go
Normal file
10
model/model.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Model struct {
|
||||
ID uint `json:"id" gorm:"primarykey"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt *time.Time `json:"deletedAt" gorm:"index"`
|
||||
}
|
||||
9
model/user.go
Normal file
9
model/user.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
type User struct {
|
||||
Model
|
||||
|
||||
Email string `json:"email" gorm:"unique"`
|
||||
Login string `json:"login" gorm:"unique"`
|
||||
Password string `json:"-"`
|
||||
}
|
||||
14
model/wishlist.go
Normal file
14
model/wishlist.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Wishlist struct {
|
||||
UUID string `json:"uuid"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
UserID uint `json:"userId"`
|
||||
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt *time.Time `json:"deletedAt" gorm:"index"`
|
||||
}
|
||||
Reference in New Issue
Block a user