func NewDeck(id string) (*Deck, error) {
	d := &Deck{
		ID:       id,
		Created:  now().UTC(),
		Modified: now().UTC(),
		Cards:    NewCardCollection(),
	}
	if err := d.Validate(); err != nil {
		return nil, err
	}
	return d, nil
}
// NewDeck creates a new Deck with the provided id.
NewDeck creates a new Deck with the provided id.
// NewDeck creates a new Deck with the provided id .
func NewDeck(id string) (*Deck, error) {
	d := &Deck{
		ID:       id,
		Created:  now().UTC(),
		Modified: now().UTC(),
		Cards:    NewCardCollection(),
	}
	if err := d.Validate(); err != nil {
		return nil, err
	}
	return d, nil
}
func NewDeck ( id string ) ( * Deck , error ) { d := & Deck { ID : id , Created : now ( ) . UTC ( ) , Modified : now ( ) . UTC ( ) , Cards : NewCardCollection ( ) , } if err := d . Validate ( ) ; err != nil { return nil , err } return d , nil }
NewDeck creates a new Deck with the provided id.
NewDeck creates a new Deck with the provided id .