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:
Vijay Joshi
2024-09-17 10:01:07 +05:30
committed by GitHub
parent 5c46ee2406
commit fd2a977e82
35 changed files with 1106 additions and 107 deletions

View File

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

View File

@@ -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 {