app-cloudep-product-service/pkg/domain/repository/kyc.go

51 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package repository
import (
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
"context"
)
// KYCKnow Your Customer
type KYCRepository interface {
// Create 建立 KYC 資料
Create(ctx context.Context, kyc *entity.KYC) error
// FindLatestByUID 根據使用者 UID 取得最新 KYC 紀錄
FindLatestByUID(ctx context.Context, uid string) (*entity.KYC, error)
// FindByID 根據 KYC ID 查詢
FindByID(ctx context.Context, id string) (*entity.KYC, error)
// List 分頁查詢(後台審核列表用)
List(ctx context.Context, params KYCQueryParams) ([]*entity.KYC, int64, error)
// UpdateStatus 更新 KYC 狀態與審核原因(審核用)
UpdateStatus(ctx context.Context, id string, status string, reason string) error
// UpdateKYCInfo 更新使用者的 KYC限於尚未審核的
UpdateKYCInfo(ctx context.Context, id string, update *KYCUpdateParams) error
}
type KYCQueryParams struct {
UID *string
Country *string
Status *string // PENDING, APPROVED, REJECTED
PageSize int64
PageIndex int64
SortByDate bool // 是否依申請時間倒序
}
type KYCUpdateParams struct {
Name *string
Identification *string
IdentificationType *string
Address *string
PostalCode *string
DateOfBirth *string
Gender *string
IDFrontImage *string
IDBackImage *string
BankStatementImg *string
BankCode *string
BankName *string
BranchCode *string
BranchName *string
BankAccount *string
}