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, } }