feedizer/models/models.go

55 lines
1.5 KiB
Go
Raw Permalink Normal View History

package models
import (
"net"
"time"
"github.com/google/uuid"
)
type Feed struct {
ID uuid.UUID // PRIMARY KEY
Title string // NOT NULL UNIQUE
URI string // NOT NULL
RefreshInterval int //
NextRefresh time.Time // NOT NULL
Expire bool // NOT NULL
ExpireDate time.Time //
Password string //
CreationIP net.IP // NOT NULL
CreationDate time.Time // NOT NULL DEFAULT now()
}
type Feeditem struct {
Feed int // NOT NULL REFERENCES feed ON DELETE CASCADE ON UPDATE CASCADE
Timestamp time.Time // NOT NULL DEFAULT now()
HTML string // NOT NULL
Diff string //
//PRIMARY KEY (feed_ time.Time //)
}
type Announcement struct {
ID uuid.UUID // PRIMARY KEY
Title string // NOT NULL
Content string // NOT NULL
Abstract string //
PublicationDate time.Time // NOT NULL DEFAULT now()
ShowUntil time.Time //
IsImportant bool // NOT NULL
}
type Feedhistory struct {
Feed int // NOT NULL REFERENCES feed ON DELETE CASCADE ON UPDATE CASCADE
Timestamp time.Time // NOT NULL DEFAULT now()
IP net.IP // NOT NULL
Slug string //
URI string //
AutoRefresh bool //
RefreshInterval int //
NextRefresh time.Time //
Expire bool // NOT NULL
ExpireDate time.Time //
Password string //
//PRIMARY KEY (feed_ time.Time //)
}