You've already forked openaccounting-server
forked from cybercinch/openaccounting-server
19 lines
770 B
Go
19 lines
770 B
Go
|
|
package models
|
||
|
|
|
||
|
|
// Account represents a financial account
|
||
|
|
type Account struct {
|
||
|
|
ID []byte `gorm:"type:BINARY(16);primaryKey"`
|
||
|
|
OrgID []byte `gorm:"column:orgId;type:BINARY(16);not null"`
|
||
|
|
Inserted uint64 `gorm:"column:inserted;not null"`
|
||
|
|
Updated uint64 `gorm:"column:updated;not null"`
|
||
|
|
Name string `gorm:"column:name;size:100;not null"`
|
||
|
|
Parent []byte `gorm:"column:parent;type:BINARY(16);not null"`
|
||
|
|
Currency string `gorm:"column:currency;size:10;not null"`
|
||
|
|
Precision int `gorm:"column:precision;not null"`
|
||
|
|
DebitBalance bool `gorm:"column:debitBalance;not null"`
|
||
|
|
|
||
|
|
Org Org `gorm:"foreignKey:OrgID"`
|
||
|
|
Splits []Split `gorm:"foreignKey:AccountID"`
|
||
|
|
Balances []Balance `gorm:"foreignKey:AccountID"`
|
||
|
|
}
|