package request import ( "sorbet/internal/entities" ) type SystemPermissionUpsertRequest struct { ID uint `json:"id" xml:"id" form:"id" path:"id"` PID uint `json:"pid" xml:"pid" form:"pid"` Name string `json:"name" xml:"name" form:"name"` Type string `json:"type" xml:"type" form:"type"` Identifier string `json:"identifier" xml:"identifier" form:"identifier"` } func (s *SystemPermissionUpsertRequest) GetID() any { return s.ID } func (s *SystemPermissionUpsertRequest) ToMap() map[string]any { return map[string]any{ "id": s.ID, "pid": s.PID, "name": s.Name, "type": s.Type, "identifier": s.Identifier, } } func (s *SystemPermissionUpsertRequest) ToEntity() any { return &entities.SystemPermission{ ID: s.ID, PID: &s.PID, Name: s.Name, Type: s.Type, Identifier: s.Identifier, } }