* TP-0000 | fixing get incident issue * TP-0000 | adding lastupdatedBy in team and severity, fixing empty user list issue * TP-0000 | reformatting * TP-0000 | reformatting * TP-0000 | reformatting * TP-0000 | reformatting
30 lines
835 B
Go
30 lines
835 B
Go
package service
|
|
|
|
import (
|
|
"houston/model/severity"
|
|
"time"
|
|
|
|
"github.com/lib/pq"
|
|
)
|
|
|
|
type SeverityResponse struct {
|
|
Id uint `json:"id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
Sla int `json:"sla"`
|
|
SlackUserIds pq.StringArray `json:"slackUserIds"`
|
|
Participants []UserResponse `json:"participants,omitempty"`
|
|
UpdatedAt time.Time `json:"lastUpdatedAt,omitempty"`
|
|
}
|
|
|
|
func ConvertToSeverityResponse(severityEntity severity.SeverityEntity) SeverityResponse {
|
|
return SeverityResponse{
|
|
Id: severityEntity.ID,
|
|
Name: severityEntity.Name,
|
|
Description: severityEntity.Description,
|
|
Sla: severityEntity.Sla,
|
|
SlackUserIds: severityEntity.SlackUserIds,
|
|
UpdatedAt: severityEntity.Model.UpdatedAt,
|
|
}
|
|
}
|