//
// 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"`
}

