36 lines
443 B
Go
36 lines
443 B
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
Admin = iota
|
||
|
Editor
|
||
|
Writer
|
||
|
)
|
||
|
|
||
|
type User struct {
|
||
|
UserName string
|
||
|
FirstName string
|
||
|
LastName string
|
||
|
RejectedArticles []*Article
|
||
|
ID int64
|
||
|
Role int
|
||
|
}
|
||
|
|
||
|
type Tag struct {
|
||
|
Name string
|
||
|
ID int64
|
||
|
}
|
||
|
|
||
|
type Article struct {
|
||
|
Title string
|
||
|
Created time.Time
|
||
|
Desc string
|
||
|
Content string
|
||
|
Published bool
|
||
|
ID int64
|
||
|
AuthorID int64
|
||
|
}
|