Files
houston-be/model/severity/entity.go
Vijay Joshi 17acefb2a8 INFRA-2901 : Add severity team function for incident use cases (#383)
* 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>
2024-02-28 18:20:10 +05:30

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