You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/models/email.go

29 lines
748 B
Go

//
// Copyright (C) 2024 veypi <i@veypi.com>
// 2025-03-04 16:08:06
// Distributed under terms of the MIT license.
//
package models
import (
"github.com/veypi/vigo"
)
// EmailLog 邮件发送日志
type EmailLog struct {
vigo.Model
To string `gorm:"index;size:100;not null" json:"to"`
Subject string `gorm:"size:200" json:"subject"`
Content string `gorm:"type:text" json:"content"`
Provider string `gorm:"size:20;not null" json:"provider"` // smtp/sendgrid
Status string `gorm:"size:20;not null" json:"status"` // sent/failed
Error string `gorm:"type:text" json:"error"`
MessageID string `gorm:"size:100" json:"message_id"`
}
// TableName 表名
func (EmailLog) TableName() string {
return "email_logs"
}