entity

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	ID uuid.UUID

	Word        string
	Translation string

	Deck *Deck
}

func CardFromDomain

func CardFromDomain(dom domain.Card) *Card

func (*Card) ToDomain

func (c *Card) ToDomain() *domain.Card

func (*Card) UpdateFrom

func (c *Card) UpdateFrom(dom domain.Card) *Card

type Cards

type Cards []Card

func (Cards) ToDomain

func (d Cards) ToDomain() []domain.Card

type Deck

type Deck struct {
	ID uuid.UUID

	Name string
}

func DeckFromDomain

func DeckFromDomain(dom *domain.Deck) *Deck

func (*Deck) ToDomain

func (d *Deck) ToDomain() *domain.Deck

func (*Deck) UpdateFrom

func (d *Deck) UpdateFrom(dom domain.Deck) *Deck

type Decks

type Decks []Deck

func (Decks) ToDomain

func (d Decks) ToDomain() []domain.Deck

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL