domain

package
v0.0.0-...-a5d3043 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	gorm.Model

	Name          string
	InitAmount    int32
	CurrentAmount int32
	TypeId        int8
	// 账本id
	BookId int

	// 信用卡 最大额度
	MaxAmount int32

	// 信用卡 账单日
	BillDay int8

	// 信用卡 还款日 负数表示账单日的相对天数
	RepaymentDay int8
}

func (Account) TableName

func (Account) TableName() string

type BookKeeping

type BookKeeping struct {
	gorm.Model

	Name string
}

func (BookKeeping) TableName

func (BookKeeping) TableName() string

type Category

type Category struct {
	gorm.Model
	// id:id 构成的绝对路径
	AbsoluteHierarchy string
	ParentId          uint
	// 叶节点才参与记账
	Leaf bool
	Name string
	// CategoryType
	TypeId int8
}

func (Category) TableName

func (Category) TableName() string

type Record

type Record struct {
	gorm.Model

	AccountId uint

	// 转账记录时间戳 联系转入和转出
	TransferId uint

	// 分为单位
	Amount int

	// 备注
	Comment string

	// 交易的分类id
	CategoryId uint

	//Type record_type 支出 收入 转出 转入
	Type int8

	// 记录发生时刻
	RecordTime time.Time
}

func (Record) TableName

func (Record) TableName() string

type TransferRecord

type TransferRecord struct {
	gorm.Model

	FromAccount int16
	ToAccount   int16
	Amount      int
	// 记录发生时刻
	RecordTime time.Time
}

Jump to

Keyboard shortcuts

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