package library

import (
	"gopkg.in/mgo.v2/bson"
)

// Book defines the data model for library books with id, title, author, publisher,
// isbn, year and edition.
type Book struct {
	ID        bson.ObjectId `json:"_id" bson:"_id,omitempty"`
	Title     string        `json:"title" bson:"title"`
	Author    string        `json:"author" bson:"author"`
	Publisher bson.ObjectId `json:"publisher" bson:"publisher,omitempty"`
	Isbn      string        `json:"isbn" bson:"isbn,omitempty"`
	Year      int           `json:"year" bson:"year,omitempty"`
	Edition   string        `json:"edition" bson:"edition,omitempty"`
	Model     string        `json:"model" bson:"model,omitempty"`
}
