INFRA-3705 : Creation of RCA ticket for sev-0 non-escalated non-CX incidents (#456)
* INFRA-3705 : Creation of RCA ticket for sev-0 non-escalated non-CX incidents * INFRA-3705 : Self review * INFRA-3705 : Fix tests: * INFRA-3705 : UT's and minor constant changes * INFRA-3705 : Add migration script
This commit is contained in:
@@ -22,3 +22,19 @@ type ExternalTeamEntity struct {
|
||||
func (ExternalTeamEntity) TableName() string {
|
||||
return "external_team"
|
||||
}
|
||||
|
||||
func (entity *ExternalTeamEntity) ToDTO() *ExternalTeamDTO {
|
||||
return &ExternalTeamDTO{
|
||||
ID: entity.ID,
|
||||
ExternalTeamID: entity.ExternalTeamID,
|
||||
ExternalTeamName: entity.ExternalTeamName,
|
||||
Metadata: entity.Metadata,
|
||||
ProviderName: entity.ProviderName,
|
||||
TeamID: entity.TeamID,
|
||||
IsActive: entity.IsActive,
|
||||
CreatedAt: entity.CreatedAt,
|
||||
UpdatedAt: entity.UpdatedAt,
|
||||
CreatedBy: entity.CreatedBy,
|
||||
UpdatedBy: entity.UpdatedBy,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
package externalTeam
|
||||
|
||||
import "gorm.io/datatypes"
|
||||
import (
|
||||
"gorm.io/datatypes"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ExternalTeamDTO struct {
|
||||
ID uint `json:"id,omitempty"`
|
||||
ExternalTeamID string `json:"external_team_id,omitempty"`
|
||||
ExternalTeamName string `json:"external_team_name,omitempty"`
|
||||
Metadata datatypes.JSON `json:"metadata,omitempty"`
|
||||
ProviderName string `json:"provider_name,omitempty"`
|
||||
TeamID uint `json:"team_id,omitempty"`
|
||||
IsActive bool `json:"is_active,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
UpdatedBy string `json:"updated_by,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalTeamMetadata struct {
|
||||
|
||||
Reference in New Issue
Block a user