You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
787 B
34 lines
787 B
package request
|
|
|
|
import (
|
|
"sorbet/internal/entities"
|
|
)
|
|
|
|
type SystemUserUpsertRequest struct {
|
|
ID int64 `json:"id" xml:"id" form:"id" path:"id"`
|
|
Username string `json:"username" xml:"username" form:"username"`
|
|
Password string `json:"password" xml:"password" form:"password"`
|
|
Status bool `json:"status" xml:"status" form:"status"`
|
|
}
|
|
|
|
func (s *SystemUserUpsertRequest) GetID() any {
|
|
return s.ID
|
|
}
|
|
|
|
func (s *SystemUserUpsertRequest) ToMap() map[string]any {
|
|
return map[string]any{
|
|
"id": s.ID,
|
|
"username": s.Username,
|
|
"password": s.Password,
|
|
"status": s.Status,
|
|
}
|
|
}
|
|
|
|
func (s *SystemUserUpsertRequest) ToEntity() any {
|
|
return &entities.SystemUser{
|
|
ID: s.ID,
|
|
Username: s.Username,
|
|
Password: s.Password,
|
|
Status: s.Status,
|
|
}
|
|
}
|
|
|