You've already forked openaccounting-server
forked from cybercinch/openaccounting-server
- Add GORM models in models/ directory with proper column tags - Create repository interfaces and implementations in core/repository/ - Add database package with MySQL and SQLite support - Add UUID ID utility for GORM models - Implement complete repository layer replacing SQL-based data access - Add database migrations and index creation - Support both MySQL and SQLite drivers with auto-migration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
14 lines
460 B
Go
14 lines
460 B
Go
package models
|
|
|
|
// BudgetItem represents budget items
|
|
type BudgetItem struct {
|
|
ID uint `gorm:"primaryKey;autoIncrement"`
|
|
OrgID []byte `gorm:"column:orgId;type:BINARY(16);not null"`
|
|
AccountID []byte `gorm:"column:accountId;type:BINARY(16);not null"`
|
|
Inserted uint64 `gorm:"column:inserted;not null"`
|
|
Amount int64 `gorm:"column:amount;not null"`
|
|
|
|
Org Org `gorm:"foreignKey:OrgID"`
|
|
Account Account `gorm:"foreignKey:AccountID"`
|
|
}
|