package models import ( "time" ) type ClaimType string const ( ContainsMeat ClaimType = "meat" ContainsFish ClaimType = "fish" ContainsEgg ClaimType = "egg" ContainsMilk ClaimType = "milk" ContainsHoney ClaimType = "honey" ContainsWax ClaimType = "wax" ContainsFur ClaimType = "fur" ContainsLeather ClaimType = "leather" ContainsAnimalFibers ClaimType = "animal_fibers" ContainsWool ClaimType = "wool" ContainsFeathers ClaimType = "feathers" AnimalTesting ClaimType = "animal_testing" MonkeySlavery ClaimType = "monkey_slavery" ) type WorkerType string const ( Barnivore WorkerType = "barnivore" ) // Using a string here to make database modification easier. type EvidenceType string const ( ManufacturerWebsite EvidenceType = "manufacturer" IngredientsList EvidenceType = "ingredients" ) type IngredientsListEvidence struct { Ingredients string } type ClusterType string const ( User ClusterType = "user" Automated ClusterType = "auto" ) // Generic claim type for combining both automated and user claims. type Claim struct { Id int `ksql:"id"` Worker_type *WorkerType `ksql:"worker_type"` Evidence_type EvidenceType `ksql:"evidence_type"` Evidence struct{} `ksql:"evidence"` Category ClaimType `ksql:"category"` Polarity bool `ksql:"polarity"` Created_at time.Time `ksql:"created_at"` Created_by string `ksql:"created_by"` Cluster ClusterType `ksql:"cluster"` } type ProductClaims struct { Id int Claims []Claim } type UserClaimForm struct { Evidence_type EvidenceType Evidence interface{} Claims []ClaimType Counterclaims []ClaimType Created_by string }