35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
package database
|
|
|
|
import (
|
|
"time"
|
|
"vegan-barcode/internal/models"
|
|
)
|
|
|
|
type Product struct {
|
|
Id int `ksql:"id"`
|
|
System string `ksql:"system"`
|
|
Barcode string `ksql:"barcode"`
|
|
Created_at time.Time `ksql:"created_at,timeNowUTC"`
|
|
}
|
|
|
|
type AutomatedClaim struct {
|
|
Id int `ksql:"id"`
|
|
Product_id int `ksql:"product_id"`
|
|
Worker_type models.WorkerType `ksql:"worker_type"`
|
|
Evidence interface{} `ksql:"evidence,json"`
|
|
Claims []models.ClaimType `ksql:"claims"`
|
|
Counterclaims []models.ClaimType `ksql:"counterclaims"`
|
|
Created_at time.Time `ksql:"created_at,timeNowUTC"`
|
|
}
|
|
|
|
type UserClaim struct {
|
|
Id int `ksql:"id"`
|
|
Product_id int `ksql:"product_id"`
|
|
Evidence_type models.EvidenceType `ksql:"evidence_type"`
|
|
Evidence interface{} `ksql:"evidence,json"`
|
|
Claims []models.ClaimType `ksql:"claims"`
|
|
Counterclaims []models.ClaimType `ksql:"counterclaims"`
|
|
Created_at time.Time `ksql:"created_at,timeNowUTC"`
|
|
Created_by string `ksql:"created_by"`
|
|
}
|