introducing redux and fixing stuff
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user