Documentation ¶
Index ¶
- type APaymentTokenTransaction
- type APaymentTokenTransfer
- type Category
- type CategoryStats
- type Claim
- type Contribution
- type ControlCategory
- type ControlPoint
- type Cow
- type CowStats
- type EarTagNumbers
- type EtherScanTransaction
- type EtherScanTransactionResult
- type GVE
- type Inspection
- type InspectionLack
- type Journal
- type JournalEntry
- type Lack
- type LegalForm
- type MonthlyStats
- type Plant
- type PlantType
- type PointGroup
- type RausJournalRequest
- type RausJournalResponse
- type Request
- type Role
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APaymentTokenTransfer ¶
type CategoryStats ¶
type CategoryStats struct { NumberOfDaysRequired int `json:"number_of_days_required"` NumberOfAnimals int `json:"number_of_animals"` LowestDays int16 `json:"lowest_days"` MaximumDays int16 `json:"maximum_days"` CategoryName string `json:"category_name"` CategoryDescription string `json:"category_description"` CategoryCode uint8 `json:"-"` CowsStats []*CowStats `json:"cows"` }
type Claim ¶
type Claim struct { Username []string `json:"roles"` // recommended having jwt.StandardClaims }
type Contribution ¶
type Contribution struct { Id int64 `json:"id"` Code uint16 `json:"code"` Name string `json:"name"` ControlCategories []*ControlCategory `json:"controlCategories" orm:"reverse(many)"` }
type ControlCategory ¶
type ControlCategory struct { Id int64 `json:"id"` ControlCategoryId string `json:"controlCategoryId"` Abbreviation string `json:"abbreviation"` ControlCategory string `json:"controlCategory"` PointGroups []*PointGroup `orm:"reverse(many)" json:"pointGroups"` Contribution *Contribution `orm:"rel(fk);null" json:"-"` }
type ControlPoint ¶
type Cow ¶
type Cow struct { Id int64 `json:"id"` Name string `json:"name"` TVD string ` json:"tvd"` Details *tvd.CattleLivestockDataV2 `orm:"-" json:"details"` Journal []*JournalEntry `orm:"-;reverse(many)" json:"journal"` // WHY IS THIS NEEDED? Farm_id string `orm:"-" json:"farm_id,omitempty"` Categories []*Category `orm:"-" json:"categories,omitempty"` Added string `orm:"-" json:"added,omitempty"` MoreDetails *tvd.CattleDetailData `orm:"-" json:"moreDetails,omitempty"` LatestJournalEntry *JournalEntry `orm:"-" json:"latest_journal_entry,omitempty"` // WHY IS THIS NEEDED? }
func (*Cow) GetJournal ¶
func (cow *Cow) GetJournal()
type CowStats ¶
type CowStats struct { EarTagNumber string `json:"ear_tag_number"` NumberOfDaysOutside int16 `json:"number_of_days_outside"` TotalMinutesOutside int `json:"total_minutes_outside"` Name string `json:"name"` }
func (*CowStats) SetDayOutside ¶
type EarTagNumbers ¶
type EarTagNumbers struct {
EarTagNumbers []string
}
type EtherScanTransaction ¶
type EtherScanTransactionResult ¶
type EtherScanTransactionResult struct { Status string `json:"status"` Message string `json:"message"` Result []*EtherScanTransaction `json:"result"` }
type GVE ¶
type GVE struct { Amount float32 `json:"amount"` PointGroup *PointGroup `json:"pointGroup"` }
type Inspection ¶
type Inspection struct { RequestId int64 `json:"requestId"` InspectorId int64 `json:"inspectorId"` Lacks []*InspectionLack `json:"lacks"` }
type InspectionLack ¶
type Journal ¶
type Journal struct {
JournalEntries []*JournalEntry
}
type JournalEntry ¶
type JournalEntry struct { Id int64 `json:"-"` TVDS []*Cow `orm:"rel(m2m)" json:"tvds"` Year uint16 `orm:"-" json:"year"` Month uint8 `orm:"-" json:"month"` Day uint8 `orm:"-" json:"day"` Date time.Time `orm:"auto_now_add;type(date)" json:"date"` MinutesOutside int `json:"minutes_outside"` TypeOfLairage string `json:"type_of_field_lairage"` Created time.Time `orm:"auto_now_add;type(datetime)" json:"created"` Updated time.Time `orm:"auto_now;type(datetime)"` }
func (*JournalEntry) SetDate ¶
func (journalEntry *JournalEntry) SetDate()
func (*JournalEntry) TableName ¶
func (je *JournalEntry) TableName() string
type MonthlyStats ¶
type MonthlyStats struct { Month uint8 `json:"month"` Year uint16 `json:"year"` CategoryStats []*CategoryStats `json:"category_stats"` }
func (*MonthlyStats) SetCategoryMinMaxDays ¶
func (monthlyStats *MonthlyStats) SetCategoryMinMaxDays()
type Plant ¶
type Plant struct { Id int64 `json:"id"` CantonalPlantNr string `json:"cantonalPlantNr"` // e.g. 1234/70/123 Community string `json:"community"` // Deutsch: Gemeinde CommunityNr uint16 `json:"communityNr"` Name string `json:"name"` XCoordinate uint32 `json:"xCoordinate"` YCoordinate uint32 `json:"xCoordinate"` PlantType *PlantType `orm:"rel(fk);null" json:"plantType"` MetersAboveTheSea int16 `json:"metersAboveTheSea"` }
type PointGroup ¶
type PointGroup struct { Id int64 `json:"id"` PointGroupId string `json:"pointGroupId"` Abbreviation string `json:"abbreviation"` PointGroup string `json:"pointGroup"` PointGroupCode uint16 `json:"pointGroupCode"` //Condition //Type ControlCategory *ControlCategory `orm:"rel(fk);null" json:"-"` ControlPoints []*ControlPoint `orm:"reverse(many)" json:"controlPoints"` }
type RausJournalRequest ¶
type RausJournalResponse ¶
type Request ¶
type Request struct { Id int64 `json:"id"` User *User `orm:"rel(fk)" json:"user"` Address string `json:"address"` Contributions []*Contribution `orm:"-" json:"contributions"` Remark string `orm:"-" json:"remark"` Created *big.Int `orm:"-" json:"created"` Modified *big.Int `orm:"-" json:"modified"` Inspector *User `orm:"rel(fk);null" json:"inspector"` ContributionsWithLacks []*Contribution `orm:"-" json:"contributionsWithLacks"` GVE []*GVE `orm:"-" json:"gve"` Payments []*APaymentTokenTransaction `orm:"-" json:"payments"` }
type User ¶
type User struct { Id int64 `json:"id"` Username string `orm:"unique" json:"username"` Password string `json:"password"` Email string `orm:"unique" json:"email"` Roles []*Role `orm:"rel(m2m)" json:"roles"` JwtToken string `orm:"-" json:"token"` EtherumAddress string `json:"etherumAddress"` EthereumBalance *big.Int `orm:"-" json:"ethereumBalance"` APaymentTokenBalance *big.Int `orm:"-" json:"apaymentTokenBalance"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` PersonAddressResult *tvd.PersonAddressResult `orm:"-" json:"agateDetails"` AnimalHusbandryDetailResult *tvd.GetAnimalHusbandryDetailResult `orm:"-" json:"AnimalHusbandryDetailResult"` TVD int32 `json:"tvd"` }
Click to show internal directories.
Click to hide internal directories.