init: 1.0.0

This commit is contained in:
Chang lue Tsen
2025-04-25 12:08:29 +09:00
commit 8addcc584b
1031 changed files with 76472 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
package log
import "time"
type MessageType int
const (
Email MessageType = iota + 1
Mobile
)
func (t MessageType) String() string {
switch t {
case Email:
return "email"
case Mobile:
return "mobile"
}
return "unknown"
}
type MessageLog struct {
Id int64 `gorm:"primaryKey"`
Type string `gorm:"type:varchar(50);not null;default:'email';comment:Message Type"`
Platform string `gorm:"type:varchar(50);not null;default:'smtp';comment:Platform"`
To string `gorm:"type:text;not null;comment:To"`
Subject string `gorm:"type:varchar(255);not null;default:'';comment:Subject"`
Content string `gorm:"type:text;comment:Content"`
Status int `gorm:"type:tinyint(1);not null;default:0;comment:Status"`
CreatedAt time.Time `gorm:"<-:create;comment:Create Time"`
UpdatedAt time.Time `gorm:"comment:Update Time"`
}
func (m *MessageLog) TableName() string {
return "message_log"
}
type MessageLogFilterParams struct {
Type string
Platform string
To string
Subject string
Content string
Status int
}