diff options
| author | Bobby <[email protected]> | 2026-03-08 04:00:38 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-03-08 04:00:38 +0530 |
| commit | 44e056c26936b302478fa4e64e3f8e3e6a9a30cf (patch) | |
| tree | 15546500b74b10fcb741727440666f2f5167c174 /models | |
| parent | caf265e7050edefa64ecf7e13828ec9636bce867 (diff) | |
| download | dove-44e056c26936b302478fa4e64e3f8e3e6a9a30cf.tar.xz dove-44e056c26936b302478fa4e64e3f8e3e6a9a30cf.zip | |
feat: Enhance mail and domain management UI and functionality
- Updated users page to include a help link with an icon.
- Refactored sidebar navigation to improve organization and added collapsible sections for Domains and Mail.
- Created new pages for managing domains and TLDs, including a detailed description of the Domain Manager.
- Implemented confirmation modals for deleting TLDs with appropriate messaging.
- Added JavaScript functionality for sidebar state management and confirmation modals.
- Introduced new Go handlers for mail index and domain management.
- Added validation functions for DNS labels and email local parts.
Diffstat (limited to 'models')
| -rw-r--r-- | models/mail/mailbox.go | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/models/mail/mailbox.go b/models/mail/mailbox.go index 62e3f1d..93aa5d1 100644 --- a/models/mail/mailbox.go +++ b/models/mail/mailbox.go @@ -1,12 +1,17 @@ package mail -import "gorm.io/gorm" +import ( + domainModel "dove/models/domain" + "gorm.io/gorm" +) type Mailbox struct { gorm.Model - Address string `gorm:"uniqueIndex;not null" json:"address"` - UserID uint `gorm:"not null" json:"user_id"` - User User `gorm:"foreignKey:UserID" json:"user"` - Aliases []Alias `gorm:"foreignKey:MailboxID" json:"aliases"` - Emails []Email `gorm:"foreignKey:MailboxID" json:"emails"` + Address string `gorm:"uniqueIndex;not null" json:"address"` + UserID uint `gorm:"not null" json:"user_id"` + User User `gorm:"foreignKey:UserID" json:"user"` + DomainID uint `gorm:"not null" json:"domain_id"` + Domain domainModel.Domain `gorm:"foreignKey:DomainID" json:"domain"` + Aliases []Alias `gorm:"foreignKey:MailboxID" json:"aliases"` + Emails []Email `gorm:"foreignKey:MailboxID" json:"emails"` } |
