* INFRA-3664 : Make get users in conversation api more performant * INFRA-3664 : Add apis for incident user sync and get users in incident performance improvements * INFRA-3664 : Self review * INFRA-3664 : Add migration script * INFRA-3664 : Review comments * INFRA-3664 : Constant chanes * INFRA-3664 : Add rate limit constants * INFRA-3664 : Add rate limit constants * INFRA-3664 : Fix failing tests * INFRA-3664 : Add UT's
29 lines
748 B
Go
29 lines
748 B
Go
package requestStatus
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
"gorm.io/datatypes"
|
|
)
|
|
|
|
type RequestStatusEntity struct {
|
|
ID uint `gorm:"primaryKey"`
|
|
RequestID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();not null"`
|
|
RequestType string `gorm:"type:varchar(255);not null"`
|
|
Status string `gorm:"type:varchar(255);not null"`
|
|
Message datatypes.JSON `gorm:"type:jsonb"`
|
|
}
|
|
|
|
func (RequestStatusEntity) TableName() string {
|
|
return "request_status"
|
|
}
|
|
|
|
func (entity RequestStatusEntity) ToDTO() RequestStatusDTO {
|
|
return RequestStatusDTO{
|
|
ID: entity.ID,
|
|
RequestID: entity.RequestID,
|
|
RequestType: entity.RequestType,
|
|
Status: entity.Status,
|
|
Message: entity.Message,
|
|
}
|
|
}
|