48 lines
		
	
	
		
			1018 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1018 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package main
 | 
						|
 | 
						|
import "time"
 | 
						|
 | 
						|
type (
 | 
						|
	Guild struct {
 | 
						|
		ID   int64
 | 
						|
		Name string `json:"name"`
 | 
						|
	}
 | 
						|
	Player struct {
 | 
						|
		ID           int64  `json:"id"`
 | 
						|
		Name         string `json:"name"`
 | 
						|
		Guild        Guild  `json:"guild,omitempty"`
 | 
						|
		Notes        int    `json:"notes"`
 | 
						|
		Associations int    `json:"associations"`
 | 
						|
	}
 | 
						|
	Association struct {
 | 
						|
		ID   int64  `json:"id"`
 | 
						|
		LHS  Player `json:"lhs"`
 | 
						|
		RHS  Player `json:"rhs"`
 | 
						|
		Note string `json:"note"`
 | 
						|
	}
 | 
						|
	Note struct {
 | 
						|
		ID        int64     `json:"id"`
 | 
						|
		Content   string    `json:"content"`
 | 
						|
		Timestamp time.Time `json:"timestamp"`
 | 
						|
		Player    Player    `json:"player"`
 | 
						|
	}
 | 
						|
)
 | 
						|
 | 
						|
type NoteData struct {
 | 
						|
	Player       string
 | 
						|
	Date         time.Time
 | 
						|
	Guild        string
 | 
						|
	Note         string
 | 
						|
	Associations []NoteAssociationData
 | 
						|
}
 | 
						|
type NoteAssociationData struct {
 | 
						|
	Player string
 | 
						|
	Note   string
 | 
						|
}
 | 
						|
 | 
						|
type Response struct {
 | 
						|
	Success bool        `json:"success"`
 | 
						|
	Message string      `json:"message"`
 | 
						|
	Data    interface{} `json:"data"`
 | 
						|
}
 |