29 lines
559 B
Go
29 lines
559 B
Go
package team
|
|
|
|
import (
|
|
"github.com/lib/pq"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type TeamEntity struct {
|
|
gorm.Model
|
|
Name string `gorm:"column:name"`
|
|
SlackUserIds pq.StringArray `gorm:"column:slack_user_ids;type:string[]"`
|
|
Active bool `gorm:"column:active"`
|
|
}
|
|
|
|
func (TeamEntity) TableName() string {
|
|
return "team"
|
|
}
|
|
|
|
type TeamTagEntity struct {
|
|
gorm.Model
|
|
TeamId int `gorm:"column:team_id"`
|
|
TagId int `gorm:"column:tag_id"`
|
|
Optional bool `gorm:"column:optional"`
|
|
}
|
|
|
|
func (TeamTagEntity) TableName() string {
|
|
return "team_tag"
|
|
}
|