Adds base type for our system
This commit is contained in:
56
bd.go
Normal file
56
bd.go
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
// An AlbumState describe the state of an Album
|
||||||
|
type AlbumState int
|
||||||
|
|
||||||
|
const (
|
||||||
|
NEW AlbumState = iota // 0
|
||||||
|
MINT // 1
|
||||||
|
GOOD // 2
|
||||||
|
AVERAGE // 3
|
||||||
|
BAD // 4
|
||||||
|
)
|
||||||
|
|
||||||
|
// 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 uint64
|
||||||
|
ISBN string
|
||||||
|
Series string
|
||||||
|
Title string
|
||||||
|
Num uint
|
||||||
|
NumA string
|
||||||
|
State AlbumState
|
||||||
|
|
||||||
|
Author string
|
||||||
|
Editor string
|
||||||
|
Collection string
|
||||||
|
SatID string
|
||||||
|
|
||||||
|
LegalDeposit time.Time
|
||||||
|
PrintDate time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
// An AlbumDescription is a more complete BD description
|
||||||
|
//
|
||||||
|
// It holds data that can be fetched from bedetheque.com
|
||||||
|
type AlbumDescription struct {
|
||||||
|
Album *Album
|
||||||
|
|
||||||
|
HasCover bool
|
||||||
|
Description string
|
||||||
|
Note float64
|
||||||
|
|
||||||
|
Scenarist string
|
||||||
|
Designer string
|
||||||
|
Colorist string
|
||||||
|
Cycle string
|
||||||
|
Format string
|
||||||
|
Pages int32
|
||||||
|
|
||||||
|
Created time.Time
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user