- Seller KYC via Stripe Identity (start verification, status check, webhook) - Support ticket system (backend handler + frontend form page) - E2E payout flow integration test (sale → payment → balance → payout) - Migrations: seller_kyc columns, support_tickets table - Frontend: SupportPage with SUMI design, lazy loading, routing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
1.4 KiB
Go
29 lines
1.4 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// SellerStripeAccount links a user (seller) to their Stripe Connect Express account
|
|
type SellerStripeAccount struct {
|
|
ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:gen_random_uuid()"`
|
|
UserID uuid.UUID `json:"user_id" gorm:"type:uuid;uniqueIndex;not null"`
|
|
StripeAccountID string `json:"stripe_account_id" gorm:"type:varchar(255);uniqueIndex;not null"`
|
|
ChargesEnabled bool `json:"charges_enabled" gorm:"default:false"`
|
|
PayoutsEnabled bool `json:"payouts_enabled" gorm:"default:false"`
|
|
OnboardingCompleted bool `json:"onboarding_completed" gorm:"default:false"`
|
|
// v0.13.5 TASK-MKT-001: KYC identity verification
|
|
KYCStatus string `json:"kyc_status" gorm:"type:varchar(32);default:'not_started'"`
|
|
KYCVerificationSessionID string `json:"kyc_verification_session_id,omitempty" gorm:"type:varchar(255)"`
|
|
KYCVerifiedAt *time.Time `json:"kyc_verified_at,omitempty"`
|
|
KYCLastError string `json:"kyc_last_error,omitempty" gorm:"type:text"`
|
|
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
|
|
}
|
|
|
|
// TableName specifies the table name for SellerStripeAccount
|
|
func (SellerStripeAccount) TableName() string {
|
|
return "seller_stripe_accounts"
|
|
}
|