entity

package
v0.0.0-...-ef3d5ad Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountType

type AccountType int
const (
	Regular AccountType = iota
	Premium
)

type Bank

type Bank struct {
	AccountID   string `gorm:"uniqueIndex"`
	Balance     int
	CreatedAt   time.Time
	UpdatedAt   time.Time
	AccountType AccountType
}

func (*Bank) CanWithdraw

func (b *Bank) CanWithdraw(amount int) bool

func (*Bank) ConvenienceStoreFee

func (b *Bank) ConvenienceStoreFee() int

func (*Bank) Withdraw

func (b *Bank) Withdraw(amount int) error

DomainServiceの方がいいかも

type Config

type Config struct {
	DB *DBConfig
}

type DBConfig

type DBConfig struct {
	DSN string `envconfig:"DSN" required:"true"`
}

type PlaceType

type PlaceType int
const (
	ConvenienceStore PlaceType = iota + 1
	OnlinePayment
)

Jump to

Keyboard shortcuts

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