feat: 优化收发信安全提示与状态标签,增加历史发信收件人管理与租户隔离
This commit is contained in:
1 parent
1853afbad4
commit
a8be83b64d
17 files changed
+615
-25
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// UserContact 保存单个用户的历史写信收件人,用于写信页自动补全与联系人管理
|
||||
type UserContact struct {
|
||||
ID int `xorm:"id bigint unsigned not null pk autoincr" json:"id"`
|
||||
UserID int `xorm:"user_id bigint not null" json:"-"`
|
||||
Email string `xorm:"email varchar(255) notnull" json:"email"`
|
||||
Name string `xorm:"name varchar(100) notnull default('')" json:"name"`
|
||||
LastUsedAt time.Time `xorm:"last_used_at datetime notnull" json:"last_used_at"`
|
||||
}
|
||||
|
||||
func (UserContact) TableName() string { return "user_contact" }
|
||||
|
||||
// UserTrustedSender 保存单个用户手动标记信任的发件人白名单,免除安全警告
|
||||
type UserTrustedSender struct {
|
||||
ID int `xorm:"id bigint unsigned not null pk autoincr" json:"id"`
|
||||
UserID int `xorm:"user_id bigint not null" json:"-"`
|
||||
Email string `xorm:"email varchar(255) notnull" json:"email"`
|
||||
CreatedAt time.Time `xorm:"created_at datetime created notnull" json:"created_at"`
|
||||
}
|
||||
|
||||
func (UserTrustedSender) TableName() string { return "user_trusted_sender" }
|
||||
Reference in new issue
Block a user