wip
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
package core
|
||||
|
||||
import "gorm.io/gorm"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Base struct {
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
CreatedAt time.Time `json:"createdAt" gorm:"type:timestamptz"`
|
||||
UpdatedAt string `json:"updatedAt" gorm:"type:timestamptz"`
|
||||
DeteledAt gorm.DeletedAt `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
//
|
||||
type Main struct {
|
||||
Id uint `json:"id" gorm:"primaryKey"` // depends on the system architecture
|
||||
Base
|
||||
|
||||
@@ -9,6 +9,6 @@ type User struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Name string `json:"name" gorm:"not null;size:25"`
|
||||
Password string `json:"password" gorm:"not null;size:255"`
|
||||
Status_Code erc.StatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
FailedLoginCount uint `json:"failedLoginCount"`
|
||||
Status_Code erc.StatusCode `json:"status_code" gorm:"not null;size:12"`
|
||||
FailedLoginCount uint8 `json:"failedLoginCount" gorm:"type:smallint"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user