restructure application, add get endpoint
This commit is contained in:
parent
51a34008f1
commit
4ebc663d3b
16 changed files with 266 additions and 165 deletions
61
internal/models/models.go
Normal file
61
internal/models/models.go
Normal file
|
@ -0,0 +1,61 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type ClaimType int
|
||||
|
||||
const (
|
||||
ContainsMeat ClaimType = iota
|
||||
ContainsFish
|
||||
ContainsEggs
|
||||
ContainsMilk
|
||||
ContainsHoney
|
||||
ContainsWax
|
||||
ContainsFur
|
||||
ContainsLeather
|
||||
ContainsAnimalFibers
|
||||
ContainsWool
|
||||
ContainsFeathers
|
||||
AnimalTesting
|
||||
MonkeySlavery
|
||||
)
|
||||
|
||||
type WorkerType int
|
||||
|
||||
const (
|
||||
Barnivore WorkerType = iota
|
||||
)
|
||||
|
||||
type EvidenceType int
|
||||
|
||||
const (
|
||||
ManufactureWebsite EvidenceType = iota
|
||||
IngredientsList
|
||||
)
|
||||
|
||||
type ClusterType int
|
||||
|
||||
const (
|
||||
User ClusterType = iota
|
||||
Automated
|
||||
)
|
||||
|
||||
// Generic claim type for combining both automated and user claims.
|
||||
type Claim struct {
|
||||
Id int
|
||||
Worker_type WorkerType
|
||||
Evidence_type EvidenceType
|
||||
Evidence struct{}
|
||||
Category ClaimType
|
||||
Polarity bool
|
||||
Created_at time.Time
|
||||
Created_by string
|
||||
Cluster ClusterType
|
||||
}
|
||||
|
||||
type ProductClaims struct {
|
||||
Id int
|
||||
Claims []Claim
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue