package paymentaccount

import (
	"time"
)

type PaymentAccountDTO struct {
	ID              uint64    `json:"id"`
	UserID          uint64    `json:"user_id"`
	AccountType     string    `json:"account_type"`
	AccountName     string    `json:"account_name"`
	AccountNo       string    `json:"account_no"`        // 脱敏显示
	BankName        string    `json:"bank_name"`
	BankBranch      string    `json:"bank_branch"`
	CertificateURLs []string  `json:"certificate_urls"`
	IsDefault       bool      `json:"is_default"`
	Status          string    `json:"status"`
	CreatedAt       time.Time `json:"created_at"`
	UpdatedAt       time.Time `json:"updated_at"`
}

type CreatePaymentAccountRequest struct {
	AccountType     string   `json:"account_type" binding:"required,oneof=alipay wechat bank"`
	AccountName     string   `json:"account_name" binding:"required"`
	AccountNo       string   `json:"account_no" binding:"required"`
	BankName        string   `json:"bank_name"`
	BankBranch      string   `json:"bank_branch"`
	CertificateURLs []string `json:"certificate_urls"`
}

type UpdatePaymentAccountRequest struct {
	BankBranch      string   `json:"bank_branch"`
	CertificateURLs []string `json:"certificate_urls"`
	IsDefault       *bool    `json:"is_default"`
}

type PaginatedResult struct {
	Items    []PaymentAccountDTO `json:"items"`
	Total    int64               `json:"total"`
	Page     int                 `json:"page"`
	PageSize int                 `json:"page_size"`
}
