we have fixtures ladies and gentleman
This commit is contained in:
@@ -9,14 +9,14 @@ import (
|
||||
|
||||
type Team struct {
|
||||
bun.BaseModel `bun:"table:teams,alias:t"`
|
||||
ID int `bun:"id,pk,autoincrement"`
|
||||
Name string `bun:"name,unique,notnull"`
|
||||
ShortName string `bun:"short_name,notnull,unique:short_names"`
|
||||
AltShortName string `bun:"alt_short_name,notnull,unique:short_names"`
|
||||
Color string `bun:"color"`
|
||||
ID int `bun:"id,pk,autoincrement" json:"id"`
|
||||
Name string `bun:"name,unique,notnull" json:"name"`
|
||||
ShortName string `bun:"short_name,notnull,unique:short_names" json:"short_name"`
|
||||
AltShortName string `bun:"alt_short_name,notnull,unique:short_names" json:"alt_short_name"`
|
||||
Color string `bun:"color" json:"color,omitempty"`
|
||||
|
||||
Seasons []Season `bun:"m2m:team_participations,join:Team=Season"`
|
||||
Leagues []League `bun:"m2m:team_participations,join:Team=League"`
|
||||
Seasons []Season `bun:"m2m:team_participations,join:Team=Season" json:"-"`
|
||||
Leagues []League `bun:"m2m:team_participations,join:Team=League" json:"-"`
|
||||
}
|
||||
|
||||
func NewTeam(ctx context.Context, tx bun.Tx, name, shortName, altShortName, color string, audit *AuditMeta) (*Team, error) {
|
||||
|
||||
Reference in New Issue
Block a user