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.
29 lines
509 B
29 lines
509 B
1 year ago
|
package request
|
||
|
|
||
|
import (
|
||
|
"sorbet/internal/entities"
|
||
|
)
|
||
|
|
||
|
type SystemRoleUpsertRequest struct {
|
||
|
ID uint `json:"id" xml:"id" form:"id" path:"id"`
|
||
|
Name string `json:"name" xml:"name" form:"name"`
|
||
|
}
|
||
|
|
||
|
func (s *SystemRoleUpsertRequest) GetID() any {
|
||
|
return s.ID
|
||
|
}
|
||
|
|
||
|
func (s *SystemRoleUpsertRequest) ToMap() map[string]any {
|
||
|
return map[string]any{
|
||
|
"id": s.ID,
|
||
|
"name": s.Name,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (s *SystemRoleUpsertRequest) ToEntity() any {
|
||
|
return &entities.SystemRole{
|
||
|
ID: s.ID,
|
||
|
Name: s.Name,
|
||
|
}
|
||
|
}
|