package models

import "time"

type WalletLedger struct {
	ID              uint       `gorm:"primaryKey;autoIncrement" json:"id"`
	UserID          uint       `gorm:"column:user_id" json:"user_id"`
	AstrologerID    uint       `gorm:"column:astrologer_id" json:"astrologer_id"`
	TransactionType string     `gorm:"column:transaction_type"`
	ReferenceID     uint       `gorm:"column:reference_id"`
	Credit          float64    `gorm:"column:credit"`
	Debit           float64    `gorm:"column:debit"`
	BalanceAfter    float64    `gorm:"column:balance_after"`
	Remarks         string     `gorm:"column:remarks"`
	CreatedAt       *time.Time `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	UpdatedAt       *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
}

func (WalletLedger) TableName() string {
	return "wallet_ledger"
}
