models

package
v0.0.0-...-9b663ca Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ledger

type Ledger struct {
	base.DefaultModel
	UID     uint   `gorm:"NOT NULL;comment:用户id"`
	Name    string `gorm:"size:50;NOT NULL;comment:名称"`
	Income  int    `gorm:"NOT NULL;comment:收入金额"`
	Outcome int    `gorm:"NOT NULL;comment:支出金额"`
}

func NewLedger

func NewLedger() *Ledger

type LedgerRecord

type LedgerRecord struct {
	base.DefaultModel
	LedgerID      uint `gorm:"NOT NULL;comment:账本id"`
	TradeDetailID uint `gorm:"NOT NULL;comment:交易明细id"`
	Income        int  `gorm:"NOT NULL;comment:收入金额"`
	Outcome       int  `gorm:"NOT NULL;comment:支出金额"`
}

func NewLedgerRecord

func NewLedgerRecord() *LedgerRecord

type TradeCategory

type TradeCategory struct {
	base.DefaultModel
	Status int8   `gorm:"NOT NULL;comment:交易状态"`
	Name   string `gorm:"size:50;NOT NULL;comment:名称"`
	Icon   string `gorm:"size:200;NOT NULL;comment:图标"`
}

func NewTradeCategory

func NewTradeCategory() *TradeCategory

func NewTradeCategoryFromPB

func NewTradeCategoryFromPB(in *pb.CreateTradeCategoryRequest) *TradeCategory

func (*TradeCategory) ToTradeCategoryPBs

func (m *TradeCategory) ToTradeCategoryPBs(data []*TradeCategory) []*pb.TradeCategory

ToTradeCategoryPBs ..

type TradeDetail

type TradeDetail struct {
	base.DefaultModel
	UID              uint      `gorm:"NOT NULL;comment:用户id"`
	Money            int       `gorm:"NOT NULL;comment:交易金额"`
	Status           int8      `gorm:"NOT NULL;comment:交易状态"`
	CategroyID       uint      `gorm:"NOT NULL;comment:交易类别"`
	Name             string    `gorm:"size:50;NOT NULL;comment:交易名称"`
	CardType         int8      `gorm:"NOT NULL;comment:卡类型"`
	CardNo           string    `gorm:"size:100;NOT NULL;comment:卡号"`
	TradeTime        time.Time `gorm:"NOT NULL;comment:交易时间"`
	PaymmentPlatform int8      `gorm:"NOT NULL;comment:支付平台"`
	IsOmit           bool      `gorm:"NOT NULL;comment:不计入"`
	Remark           string    `gorm:"size:500;NOT NULL;comment:备注"`
}

func NewTradeDetail

func NewTradeDetail() *TradeDetail

func NewTradeDetailFromPB

func NewTradeDetailFromPB(in *pb.CreateTradeDetailRequest) *TradeDetail

func (*TradeDetail) ToTradeDetailPBs

func (m *TradeDetail) ToTradeDetailPBs(data []*TradeDetail) []*pb.TradeDetail

ToTradeDetailPBs ..

Jump to

Keyboard shortcuts

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