From 4272d5a12b6bced80986b20c6a1b3720472726f7 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sun, 12 Jan 2014 21:36:26 -0600 Subject: [PATCH] Created Campaigns struct --- models/models.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/models/models.go b/models/models.go index f7186236..b80b2038 100644 --- a/models/models.go +++ b/models/models.go @@ -1,6 +1,14 @@ package models -// SMTPServer is used to provide a default SMTP server preference. +import ( + "net/mail" + + // SMTPServer is used to provide a default SMTP server preference. + "time" + + "github.com/jordan-wright/email" +) + type SMTPServer struct { Host string `json:"host"` User string `json:"user"` @@ -27,3 +35,14 @@ type Flash struct { Type string Message string } + +//Campaign is a struct representing a created campaign +type Campaign struct { + Id int `json:"id"` + Name string `json:"name"` + CreatedDate time.Time `json:"created_date"` + CompletedDate time.Time `json:"completed_date"` + Targets []mail.Address `json:"targets"` + Template email.Email `json:"template"` + Status string `json:"status"` +}