details improvement and unnecessary files deletion

This commit is contained in:
yoan
2024-11-24 13:36:17 +08:00
parent 37df882ed3
commit 9ff3e22c80
57 changed files with 978 additions and 5047 deletions

View File

@@ -6,16 +6,16 @@ var ValidityDuration = time.Hour * 24 * 10
type Certificate struct {
Meta
SAN string `json:"san"`
Certificate string `json:"certificate"`
PrivateKey string `json:"privateKey"`
IssuerCertificate string `json:"issuerCertificate"`
CertUrl string `json:"certUrl"`
CertStableUrl string `json:"certStableUrl"`
Output string `json:"output"`
Workflow string `json:"workflow"`
ExpireAt time.Time `json:"ExpireAt"`
NodeId string `json:"nodeId"`
SAN string `json:"san" db:"san"`
Certificate string `json:"certificate" db:"certificate"`
PrivateKey string `json:"privateKey" db:"privateKey"`
IssuerCertificate string `json:"issuerCertificate" db:"issuerCertificate"`
CertUrl string `json:"certUrl" db:"certUrl"`
CertStableUrl string `json:"certStableUrl" db:"certStableUrl"`
Output string `json:"output" db:"output"`
Workflow string `json:"workflow" db:"workflow"`
ExpireAt time.Time `json:"ExpireAt" db:"expireAt"`
NodeId string `json:"nodeId" db:"nodeId"`
}
type MetaData struct {

View File

@@ -3,7 +3,7 @@ package domain
import "time"
type Meta struct {
Id string `json:"id"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
Id string `json:"id" db:"id"`
Created time.Time `json:"created" db:"created"`
Updated time.Time `json:"updated" db:"updated"`
}

View File

@@ -29,3 +29,17 @@ func (s *Setting) GetChannelContent(channel string) (map[string]any, error) {
return v, nil
}
type NotifyTemplates struct {
NotifyTemplates []NotifyTemplate `json:"notifyTemplates"`
}
type NotifyTemplate struct {
Title string `json:"title"`
Content string `json:"content"`
}
type NotifyMessage struct {
Subject string
Message string
}

View File

@@ -15,11 +15,17 @@ const (
WorkflowNodeTypeCondition = "condition"
)
const (
WorkflowTypeAuto = "auto"
WorkflowTypeManual = "manual"
)
type Workflow struct {
Meta
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Crontab string `json:"crontab"`
Content *WorkflowNode `json:"content"`
Draft *WorkflowNode `json:"draft"`
Enabled bool `json:"enabled"`