feat: implement attachment business logic layer

- Add AttachmentInterface to main model interface
- Implement attachment CRUD operations with permission checking
- Add GetTransaction method for secure attachment access validation
- Add accountsContainReadAccess for permission verification
- Ensure users can only access attachments for authorized transactions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-01 11:04:01 +12:00
parent 04653f2f02
commit f5f0853040
4 changed files with 199 additions and 0 deletions

View File

@@ -20,11 +20,13 @@ type Interface interface {
OrgInterface
AccountInterface
TransactionInterface
AttachmentInterface
PriceInterface
SessionInterface
ApiKeyInterface
SystemHealthInteface
BudgetInterface
GetTransaction(string, string, string) (*types.Transaction, error)
}
func NewModel(db db.Datastore, bcrypt util.Bcrypt, config types.Config) *Model {