You've already forked openaccounting-server
forked from cybercinch/openaccounting-server
19 lines
762 B
Go
19 lines
762 B
Go
|
|
package models
|
||
|
|
|
||
|
|
// Transaction represents a financial transaction
|
||
|
|
type Transaction struct {
|
||
|
|
ID []byte `gorm:"type:BINARY(16);primaryKey"`
|
||
|
|
OrgID []byte `gorm:"column:orgId;type:BINARY(16);not null"`
|
||
|
|
UserID []byte `gorm:"column:userId;type:BINARY(16);not null"`
|
||
|
|
Date uint64 `gorm:"column:date;not null"`
|
||
|
|
Inserted uint64 `gorm:"column:inserted;not null"`
|
||
|
|
Updated uint64 `gorm:"column:updated;not null"`
|
||
|
|
Description string `gorm:"column:description;size:300;not null"`
|
||
|
|
Data string `gorm:"column:data;type:TEXT;not null"`
|
||
|
|
Deleted bool `gorm:"column:deleted;default:false"`
|
||
|
|
|
||
|
|
Org Org `gorm:"foreignKey:OrgID"`
|
||
|
|
User User `gorm:"foreignKey:UserID"`
|
||
|
|
Splits []Split `gorm:"foreignKey:TransactionID"`
|
||
|
|
}
|