sorarebuddy/model/membership.go

18 lines
631 B
Go
Raw Permalink Normal View History

2024-05-23 04:18:54 +00:00
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"`
}