74 lines
1.1 KiB
Go
74 lines
1.1 KiB
Go
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 (
|
|
ManufacturerWebsite EvidenceType = iota
|
|
IngredientsList
|
|
)
|
|
|
|
type IngredientsListEvidence struct {
|
|
Ingredients string
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
type UserClaimForm struct {
|
|
Evidence_type EvidenceType
|
|
Evidence interface{}
|
|
Claims []ClaimType
|
|
Counterclaims []ClaimType
|
|
Created_by string
|
|
}
|