summaryrefslogtreecommitdiff
path: root/app/controllers/db.go
blob: e96cb6380f44b6fb476ad8ed42451ce7421fd84e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package controllers

import (
	"github.com/jinzhu/gorm"
	_ "github.com/mattn/go-sqlite3"
	"github.com/revel/revel"
	"time"
)

/* Maybe worth saving uptime history? */

type Hosts struct {
	Id        int64
	UserId    int64
	Url       string
	Protocoll string // e.g. http
	Private   bool
	Response  int64
	Date      time.Time
	Success   bool
	Include   string // Website must include this string
	Except    string // Website must not include this string
	Reason    string // Include, Exclude, Connection failure
	Alert     bool   // True to send alert on failure
	CreatedAt time.Time
	DeletedAt time.Time
	UpdatedAt time.Time
}

type User struct {
	Id        int64
	Name      string
	Email     string
	Password  string
	CreatedAt time.Time
	DeletedAt time.Time
	UpdatedAt time.Time
}