func NewInventoryItemDetailView() *InventoryItemDetailView {
	if bullShitDatabase == nil {
		bullShitDatabase = NewBullShitDatabase()
	}
	return &InventoryItemDetailView{}
}
NewInventoryItemDetailView constructs a new InventoryItemDetailView
package simplecqrs
import (
	"errors"
	"log"
	"github.com/jetbasrawi/go.cqrs"
)
var bullShitDatabase *BullShitDatabase
type ReadModelFacade interface {
	GetInventoryItems() []*InventoryItemListDto
	GetInventoryItemDetails(uuid string) *InventoryItemDetailsDto
}
type InventoryItemDetailsDto struct {
	ID           string
	Name         string
	CurrentCount int
	Version      int
}
type InventoryItemListDto struct {
	ID   string
	Name string
}
type ReadModel struct {
}
func NewReadModel() *ReadModel {
	if bullShitDatabase == nil {
		bullShitDatabase = NewBullShitDatabase()
	}
	return &ReadModel{}
}
func (m *ReadModel) GetInventoryItems() []*InventoryItemListDto {
	return bullShitDatabase.List
}
func (m *ReadModel) GetInventoryItemDetails(uuid string) *InventoryItemDetailsDto {
	if i, ok := bullShitDatabase.Details[uuid]; ok {
		return i
	}
	return nil
}
type InventoryListView struct {
}
func NewInventoryListView() *InventoryListView {
	if bullShitDatabase == nil {
		bullShitDatabase = NewBullShitDatabase()
	}
	return &InventoryListView{}
}
func (v *InventoryListView) Handle(message ycq.EventMessage) {
	switch event := message.Event().(type) {
	case *InventoryItemCreated:
		bullShitDatabase.List = append(bullShitDatabase.List, &InventoryItemListDto{
			ID:   message.AggregateID(),
			Name: event.Name,
		})
	case *InventoryItemRenamed:
		for _, v := range bullShitDatabase.List {
			if v.ID == message.AggregateID() {
				v.Name = event.NewName
				break
			}
		}
	case *InventoryItemDeactivated:
		i := -1
		for k, v := range bullShitDatabase.List {
			if v.ID == message.AggregateID() {
				i = k
				break
			}
		}
		if i >= 0 {
			bullShitDatabase.List = append(
				bullShitDatabase.List[:i],
				bullShitDatabase.List[i+1:]...,
			)
		}
	}
}
type InventoryItemDetailView struct {
}