18 lines
631 B
Go
18 lines
631 B
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type Membership struct {
|
||
|
Id string `bun:"id,pk" json:"id"`
|
||
|
PlayerSlug string `bun:"player_slug,notnull" json:"playerSlug"`
|
||
|
TeamSlug string `bun:"team_slug,notnull" json:"teamSlug"`
|
||
|
StartDate time.Time `bun:"start_date,notnull" json:"startDate"`
|
||
|
EndDate *time.Time `bun:"end_date" json:"endDate"`
|
||
|
MembershipType string `bun:"membership_type" json:"membershipType"`
|
||
|
|
||
|
Player Player `bun:"rel:has-one,join:player_slug=slug" json:"player"`
|
||
|
Team *Team `bun:"rel:has-one,join:team_slug=slug" json:"team"`
|
||
|
}
|