chore: build
ci-api / test (push) Failing after 8m7s
ci-web / test (push) Failing after 5m5s

This commit is contained in:
Xor290
2026-09-20 12:18:33 +02:00
parent 8f4c7fa47a
commit 919c807004
174 changed files with 9669 additions and 1308 deletions
@@ -0,0 +1,38 @@
// Package customerverification lets a customer submit an identity document
// (front/back) for manual admin review, gating checkout when the admin has
// turned on site.Settings.CustomerVerificationRequired -- e.g. for
// age/ID-restricted goods. Documents are stored privately (never through
// the public media module) and served only to the admin and the owning
// customer through authenticated endpoints.
package customerverification
import (
"time"
"github.com/google/uuid"
)
const (
StatusPending = "pending"
StatusApproved = "approved"
StatusRejected = "rejected"
)
var ValidStatuses = map[string]bool{
StatusPending: true,
StatusApproved: true,
StatusRejected: true,
}
type CustomerVerification struct {
ID uuid.UUID `gorm:"type:uuid;primaryKey"`
UserID uuid.UUID `gorm:"type:uuid;uniqueIndex;not null"`
FrontKey string `gorm:"not null"`
BackKey string `gorm:"not null"`
Status string `gorm:"not null;default:pending"`
AdminNote string `gorm:"not null;default:''"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (CustomerVerification) TableName() string { return "customer_verifications" }