introducing redux and fixing stuff

This commit is contained in:
2022-03-23 01:53:45 +01:00
parent c6bef04c73
commit 66a61d4cf9
29 changed files with 567 additions and 188 deletions

View File

@@ -31,6 +31,9 @@ type CardDto struct {
func (c Card) ToDto() CardDto {
return CardDto{c.ID, c.Front, c.Back, c.Hint, c.CardDeckID}
}
func (c CardDto) ToDbo() Card {
return Card{Front: c.Front, Back: c.Back, Hint: c.Hint, CardDeckID: c.CardDeckID}
}
func (c *Card) BeforeCreate(tx *gorm.DB) (err error) {
c.PhaseID = phaseOneID