Skip to content

Commit

Permalink
added templates struct
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed Feb 22, 2023
1 parent 0d02894 commit bebdfe6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions models/templates.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package models

import (
"time"

"github.com/flanksource/duty/types"
"github.com/google/uuid"
)

// SystemTemplate represents the templates database table
type SystemTemplate struct {
ID uuid.UUID `gorm:"default:generate_ulid()"`
Name string
Namespace string
Labels types.JSONStringMap
Spec types.JSON
Schedule *string
CreatedAt *time.Time `json:"created_at,omitempty" time_format:"postgres_timestamp"`
UpdatedAt *time.Time `json:"updated_at,omitempty" time_format:"postgres_timestamp"`
DeletedAt *time.Time `json:"deleted_at,omitempty" time_format:"postgres_timestamp"`
}

func (cr SystemTemplate) TableName() string {
return "templates"
}

0 comments on commit bebdfe6

Please sign in to comment.