cpolis/cmd/model/structs.go

43 lines
506 B
Go

package model
import (
"time"
)
const (
Admin = iota
Editor
Writer
)
type User struct {
UserName string
FirstName string
LastName string
ID int64
Role int
}
type Tag struct {
Name string
ID int64
}
type Article struct {
Title string
Created time.Time
Description string
Content string
Published bool
Rejected bool
ID int64
AuthorID int64
}
type Attribute struct {
Value interface{}
Table string
AttName string
ID int64
}