feat (user): add create
This commit is contained in:
No files matched your search
@@ -1,6 +1,6 @@
|
||||
package single
|
||||
|
||||
type Createdto struct {
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
@@ -23,7 +23,7 @@ type ReadDetailDto struct {
|
||||
|
||||
type Updatedto struct {
|
||||
Id uint `json:"id"`
|
||||
Createdto
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type Deletedto struct {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package user
|
||||
|
||||
import erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name"`
|
||||
Password string `json:"password"`
|
||||
Status_Code erc.StatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Name string `json:"name"`
|
||||
Status_Code erc.StatusCode `json:"status_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type Updatedto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type Deletedto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user