Files
satbd-explorer/album.go
Alexandre Tuleu 0d3e8b922a Refactors the indexing and the syntax
Human queries are now in french. Sorry for that
2016-01-21 16:36:45 +01:00

66 lines
1.4 KiB
Go

package main
import "time"
// An AlbumState describe the state of an Album
type AlbumState int
// An AlbumID uniquely identifies an Album both here and www.bedetheque.com
type AlbumID uint64
const (
// NEW is "État neuf" state
NEW AlbumState = iota // 0
// MINT is "Très bon état" state
MINT // 1
// GOOD is "Bon état" state
GOOD // 2
// AVERAGE is "État moyen" state
AVERAGE // 3
// BAD is "Mauvais état" state
BAD // 4
)
// A Link represent a link to a ressource
type Link struct {
// Title of the link
Title string `bl_name:"nom" bl_analyzer:"simple"`
// Target of the link
Target string `bl_name:"target" bl_index:"false" bl_include_all:"false"`
}
// An Album is the core object in our system
//
// This is basically the data we store on bdgest.com, and that we want
// in our system to be retrieve from
type Album struct {
ID AlbumID
ISBN string
Series string `json:"série"`
Title string `json:"titre"`
Num int
NumA string
State AlbumState
Editor string `json:"éditeur"`
Collection string `json:"collection"`
SatID string `json:"ref"`
LegalDeposit time.Time
PrintDate time.Time
PurchaseDate time.Time
CoverURL string
Description string `json:"description"`
Note float64
Scenarists []string `json:"scenario"`
Designers []string `json:"dessins"`
Colorists []string `json:"couleurs"`
Links map[string]string
FetchDate time.Time
}