This commit is contained in:
parent
0bf6080f25
commit
f2e60182df
@ -29,6 +29,11 @@ func NewController(client *coach_client.Client, db *gorm.DB) *Controller {
|
||||
return ctl
|
||||
}
|
||||
|
||||
func (c *Controller) AutoMigrate() {
|
||||
if err := c.db.AutoMigrate(&database.Product{}, &database.HistoryPrice{}, &Option{}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
func (c *Controller) Run(ctx context.Context) {
|
||||
c.ctx = ctx
|
||||
ticker := time.NewTicker(c.Interval)
|
||||
|
Loading…
Reference in New Issue
Block a user