model

package
v0.0.0-...-3414fa2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type PaymentChannels

type PaymentChannels struct {
	Id        uint64    `db:"id"`         // 自增ID
	Name      string    `db:"name"`       // 渠��称
	Channel   int64     `db:"channel"`    // 渠�类型 1:微信 2:支付�
	Config    string    `db:"config"`     // 渠��置
	Status    int64     `db:"status"`     // 状� 1:�用 2:�用
	CreatedAt time.Time `db:"created_at"` // 创建时间
	UpdatedAt time.Time `db:"updated_at"` // 更新时间
}

type PaymentChannelsModel

type PaymentChannelsModel interface {
	FindAll(ctx context.Context) ([]*PaymentChannels, error)
	FindManyByStatus(ctx context.Context, status int64) ([]*PaymentChannels, error)
	UpdateFields(ctx context.Context, id uint64, updates map[string]interface{}) error
	FindOneByChannelAndStatus(ctx context.Context, channel, status int64) (*PaymentChannels, error)
	// contains filtered or unexported methods
}

PaymentChannelsModel is an interface to be customized, add more methods here, and implement the added methods in customPaymentChannelsModel.

func NewPaymentChannelsModel

func NewPaymentChannelsModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) PaymentChannelsModel

NewPaymentChannelsModel returns a model for the database table.

type PaymentLogs

type PaymentLogs struct {
	Id           uint64         `db:"id"`            // 自增ID
	PaymentNo    string         `db:"payment_no"`    // 支付��
	Type         int64          `db:"type"`          // 类型 1:支付 2:退款
	Channel      int64          `db:"channel"`       // 支付渠�
	RequestData  sql.NullString `db:"request_data"`  // 请求数�
	ResponseData sql.NullString `db:"response_data"` // �应数�
	CreatedAt    time.Time      `db:"created_at"`    // 创建时间
}

type PaymentLogsModel

type PaymentLogsModel interface {
	FindByPaymentNo(ctx context.Context, paymentNo string) ([]*PaymentLogs, error)
	FindByType(ctx context.Context, logType int64) ([]*PaymentLogs, error)
	FindByChannel(ctx context.Context, channel int64) ([]*PaymentLogs, error)
	BatchInsert(ctx context.Context, logs []*PaymentLogs) error
	// contains filtered or unexported methods
}

PaymentLogsModel is an interface to be customized, add more methods here, and implement the added methods in customPaymentLogsModel.

func NewPaymentLogsModel

func NewPaymentLogsModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) PaymentLogsModel

NewPaymentLogsModel returns a model for the database table.

type PaymentOrders

type PaymentOrders struct {
	Id          uint64         `db:"id"`           // 自增ID
	PaymentNo   string         `db:"payment_no"`   // 支付��
	OrderNo     string         `db:"order_no"`     // 订��
	UserId      uint64         `db:"user_id"`      // 用户ID
	Amount      float64        `db:"amount"`       // 支付金�
	Channel     int64          `db:"channel"`      // 支付渠� 1:微信 2:支付� 3:余�
	ChannelData sql.NullString `db:"channel_data"` // 支付渠�数�
	Status      int64          `db:"status"`       // 状� 1:待支付 2:支付中 3:已支付 4:已退款 5:已关闭
	NotifyUrl   sql.NullString `db:"notify_url"`   // 回调地�
	ReturnUrl   sql.NullString `db:"return_url"`   // 返回地�
	ExpireTime  sql.NullTime   `db:"expire_time"`  // 过期时间
	PayTime     sql.NullTime   `db:"pay_time"`     // 支付时间
	CreatedAt   time.Time      `db:"created_at"`   // 创建时间
	UpdatedAt   time.Time      `db:"updated_at"`   // 更新时间
}

type PaymentOrdersModel

type PaymentOrdersModel interface {
	FindOneByPaymentNo(ctx context.Context, paymentNo string) (*PaymentOrders, error)
	FindByUserId(ctx context.Context, userId uint64) ([]*PaymentOrders, error)
	FindByOrderNo(ctx context.Context, orderNo string) ([]*PaymentOrders, error)
	UpdateStatus(ctx context.Context, id uint64, status int64) error
	UpdatePartial(ctx context.Context, id uint64, updates map[string]interface{}) error
	GetPaymentsByStatus(ctx context.Context, status int64) ([]*PaymentOrders, error)
	FindByPaymentNo(ctx context.Context, paymentNo string) ([]*PaymentOrders, error)
	// contains filtered or unexported methods
}

PaymentOrdersModel is an interface to be customized, add more methods here, and implement the added methods in customPaymentOrdersModel.

func NewPaymentOrdersModel

func NewPaymentOrdersModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) PaymentOrdersModel

NewPaymentOrdersModel returns a model for the database table.

type RefundOrders

type RefundOrders struct {
	Id          uint64         `db:"id"`           // 自增ID
	RefundNo    string         `db:"refund_no"`    // 退款��
	PaymentNo   string         `db:"payment_no"`   // 支付��
	OrderNo     string         `db:"order_no"`     // 订��
	UserId      uint64         `db:"user_id"`      // 用户ID
	Amount      float64        `db:"amount"`       // 退款金�
	Reason      string         `db:"reason"`       // 退款原å›
	Status      int64          `db:"status"`       // 状� 1:待处� 2:处�中 3:已退款 4:退款失败
	ChannelData sql.NullString `db:"channel_data"` // 退款渠�数�
	NotifyUrl   sql.NullString `db:"notify_url"`   // 回调地�
	RefundTime  sql.NullTime   `db:"refund_time"`  // 退款时间
	CreatedAt   time.Time      `db:"created_at"`   // 创建时间
	UpdatedAt   time.Time      `db:"updated_at"`   // 更新时间
}

type RefundOrdersModel

type RefundOrdersModel interface {
	FindByUserId(ctx context.Context, userId uint64) ([]*RefundOrders, error)
	FindByPaymentNo(ctx context.Context, paymentNo string) ([]*RefundOrders, error)
	FindByRefundNo(ctx context.Context, refundNo string) ([]*RefundOrders, error)
	FindByOrderNo(ctx context.Context, orderNo string) ([]*RefundOrders, error)
	UpdateStatus(ctx context.Context, id uint64, status int64) error
	UpdatePartial(ctx context.Context, id uint64, updates map[string]interface{}) error
	GetRefundsByStatus(ctx context.Context, status int64) ([]*RefundOrders, error)
	// contains filtered or unexported methods
}

func NewRefundOrdersModel

func NewRefundOrdersModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) RefundOrdersModel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL