* INFRA-2901 : Add severity team function for incident use cases * INFRA-2901 : Add migration scripts as single and add nullability in bot and channel response --------- Co-authored-by: Shashank Shekhar <shashank.shekhar@navi.com>
31 lines
727 B
Go
31 lines
727 B
Go
package severity
|
|
|
|
import (
|
|
"github.com/lib/pq"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type SeverityEntity struct {
|
|
gorm.Model
|
|
Name string `gorm:"column:name"`
|
|
Description string `gorm:"column:description"`
|
|
Sla int `gorm:"column:sla"`
|
|
SlackUserIds pq.StringArray `gorm:"column:slack_user_ids;type:string[]"`
|
|
Priority int `gorm:"column:priority"`
|
|
}
|
|
|
|
func (SeverityEntity) TableName() string {
|
|
return "severity"
|
|
}
|
|
|
|
func (entity SeverityEntity) ToDTO() SeverityDTO {
|
|
return SeverityDTO{
|
|
ID: entity.ID,
|
|
Name: entity.Name,
|
|
Description: entity.Description,
|
|
Sla: entity.Sla,
|
|
SlackUserIds: entity.SlackUserIds,
|
|
Priority: entity.Priority,
|
|
}
|
|
}
|