📋
Eather
  • Eather
  • Module Development
    • Create new Module
    • Empty Module
    • Installable
    • Upgradable
    • Routable
    • Eventable
    • Cronable
    • Callable
Powered by GitBook
On this page

Was this helpful?

  1. Module Development

Installable

To make module Installable you need to add function Install() to your module. This function will run only once when module is installing and is stored to database. Usually used for migrating to database.

.
.
.

func (m module) Install() {
	eather.GetDb().AutoMigrate(&YourModel{})
}

// YourModel struct
type YourModel struct {
	eather.ModelBase
}

.
.
.

PreviousEmpty ModuleNextUpgradable

Last updated 5 years ago

Was this helpful?