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