finish setup insert method, refactor sql migration file
This commit is contained in:
@@ -6,12 +6,16 @@ type Style struct {
|
||||
Src string `json:"src"`
|
||||
}
|
||||
|
||||
func (s *Style) ToDB(dest *db.Style) bool {
|
||||
func (s *Style) ToDB(dest **db.Style) bool {
|
||||
if dest == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
dest.Src = s.Src
|
||||
style := &db.Style{
|
||||
Src: s.Src,
|
||||
}
|
||||
|
||||
*dest = style
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user