Created
May 22, 2018 18:53
-
-
Save andresprogra/7523c05ad7e01246c1502625d0c62319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Plan struct { | |
[....] | |
Active bool `json:"active"` | |
CreatedAt time.Time `json:"created_at"` | |
UpdatedAt time.Time `json:"updated_at"` | |
} | |
db.Model(&plan).Where("id = ?", id).Updates(Plan{ | |
Name: name, | |
Period: period, | |
IntervalCount: interval_count, | |
Currency: currency, | |
Amount: amount, | |
LimitUsers: limit_users, | |
Active: !(status == 0), | |
TrialPeriodDays: trial_period_days, | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment