Files
houston-be/model/teamSeverity/entity.go
Shashank Shekhar 233c632d38 INFRA-2866 | Create and update incident with assigner and responder from slack (#394)
* INFRA-2866 | create incident modal with product

* INFRA-2866 | Update product flow

* INFRA-2866 | Resolving review comments

* INFRA-2866 | Adding default values for product, assigner and responder

* INFRA-2866 | bug fix in getting assigner and responder team

* INFRA-2866 | bug-fix: users in no team are not getting products

* INFRA-2866 | adding log lines

* INFRA-2866 | adding assigner team members into incident

* INFRA-2866 | updated help command response text

* INFRA-2866 | adding assigner team members by severity

* INFRA-2866 | updating product list for users with no product

* INFRA-2866 | assigner teams = (teamsOfUser ++ teamsOfSelectedProducts)

* INFRA-2866 | renamed assigner to reporting team

* INFRA-2866 | query to seed product as others for current open incidents without any product
2024-03-19 16:26:30 +05:30

33 lines
812 B
Go

package teamSeverity
import (
"houston/model/severity"
"houston/model/team"
)
type TeamSeverityEntity struct {
ID uint `gorm:"primaryKey"`
TeamID uint `gorm:"column:team_id;not null"`
SeverityID uint `gorm:"column:severity_id;not null"`
Sla int `gorm:"column:sla"`
// Add foreign key constraints
Team team.TeamEntity `gorm:"foreignKey:TeamID"`
Severity severity.SeverityEntity `gorm:"foreignKey:SeverityID"`
}
func (TeamSeverityEntity) TableName() string {
return "team_severity"
}
func (entity TeamSeverityEntity) ToDTO() TeamSeverityDTO {
return TeamSeverityDTO{
ID: entity.ID,
TeamID: entity.TeamID,
SeverityID: entity.SeverityID,
Sla: entity.Sla,
TeamDTO: *entity.Team.ToDTO(),
SeverityDTO: entity.Severity.ToDTO(),
}
}