feat: 初始化核心数据库表结构、Go模型并包含日期字段类型迁移脚本
This commit is contained in:
@@ -348,7 +348,7 @@ type Transaction struct {
|
||||
CategoryID uint `gorm:"not null;index" json:"category_id"`
|
||||
AccountID uint `gorm:"not null;index" json:"account_id"`
|
||||
Currency Currency `gorm:"size:10;not null;default:'CNY'" json:"currency"`
|
||||
TransactionDate time.Time `gorm:"type:date;not null;index" json:"transaction_date"`
|
||||
TransactionDate time.Time `gorm:"type:datetime;not null;index" json:"transaction_date"`
|
||||
Note string `gorm:"size:500" json:"note,omitempty"`
|
||||
ImagePath string `gorm:"size:255" json:"image_path,omitempty"`
|
||||
RecurringID *uint `gorm:"index" json:"recurring_id,omitempty"`
|
||||
@@ -361,9 +361,8 @@ type Transaction struct {
|
||||
// Validates: Requirements 3.10
|
||||
LedgerID *uint `gorm:"index" json:"ledger_id,omitempty"`
|
||||
|
||||
// Precise time recording
|
||||
// Feature: accounting-feature-upgrade
|
||||
// Validates: Requirements 5.2
|
||||
// TransactionTime is deprecated - time is now stored in TransactionDate (DATETIME)
|
||||
// Kept for backward compatibility with existing data
|
||||
TransactionTime *time.Time `gorm:"type:time" json:"transaction_time,omitempty"`
|
||||
|
||||
// Transaction sub-type for special transactions
|
||||
|
||||
Reference in New Issue
Block a user