| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package dao
- import "wails-app/internal/global"
- // PaymentEntryConfig describes where a payment is initiated.
- type PaymentEntryConfig struct {
- global.GVA_MODEL
- Code string `gorm:"size:32;not null;uniqueIndex" json:"code"`
- Name string `gorm:"size:50;not null" json:"name"`
- Enabled bool `gorm:"not null;default:false" json:"enabled"`
- Sort int `gorm:"not null;default:0" json:"sort"`
- IsSystem bool `gorm:"not null;default:false" json:"is_system"`
- Description string `gorm:"size:200" json:"description"`
- MethodCodes []string `gorm:"-" json:"method_codes"`
- }
- func (PaymentEntryConfig) TableName() string {
- return "payment_entry_config"
- }
- // PaymentEntryMethod links a payment entry to the payment methods it accepts.
- type PaymentEntryMethod struct {
- global.GVA_MODEL
- EntryCode string `gorm:"size:32;not null;uniqueIndex:idx_payment_entry_method" json:"entry_code"`
- MethodCode string `gorm:"size:32;not null;uniqueIndex:idx_payment_entry_method" json:"method_code"`
- Sort int `gorm:"not null;default:0" json:"sort"`
- }
- func (PaymentEntryMethod) TableName() string {
- return "payment_entry_method"
- }
- // PaymentMethodConfig describes how money is settled. It is deliberately
- // independent from the entry that initiated the payment.
- type PaymentMethodConfig struct {
- global.GVA_MODEL
- Code string `gorm:"size:32;not null;uniqueIndex" json:"code"`
- Name string `gorm:"size:50;not null" json:"name"`
- InputMode string `gorm:"size:24;not null" json:"input_mode"`
- Enabled bool `gorm:"not null;default:false" json:"enabled"`
- Sort int `gorm:"not null;default:0" json:"sort"`
- IsSystem bool `gorm:"not null;default:false" json:"is_system"`
- IsLegacy bool `gorm:"not null;default:false" json:"is_legacy"`
- Description string `gorm:"size:200" json:"description"`
- EntryCodes []string `gorm:"-" json:"entry_codes"`
- // Scenes is kept only to read the pre-split schema during startup upgrade.
- Scenes []string `gorm:"serializer:json;type:text;column:scenes" json:"-"`
- }
- func (PaymentMethodConfig) TableName() string {
- return "payment_method_config"
- }
|