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"`
|
||||
}
|
||||
8
model/user.go
Normal file
8
model/user.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package model
|
||||
|
||||
type User struct {
|
||||
Model
|
||||
|
||||
Login string `json:"login" gorm:"unique"`
|
||||
Password string `json:"-"`
|
||||
}
|
||||
Reference in New Issue
Block a user