restructure application, add get endpoint

This commit is contained in:
katefort 2025-04-21 18:30:12 -05:00
parent 51a34008f1
commit 4ebc663d3b
16 changed files with 266 additions and 165 deletions

61
internal/models/models.go Normal file
View 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
}