// CreateModel attempts add the given model to database.
CreateModel attempts add the given model to database.
// CreateModel attempts add the given model to database .
func (d *Database) CreateModel (model interface{}) error {
	err := d.DB.CreateTable(model, &orm.CreateTableOptions{
		IfNotExists: true,
	})
	if err != nil {
		d.Error("CreateModel", "Model not created", err)
		return errors.New("Could not create model"+ err.Error())
	}
	d.Success("CreateModel", "Model created successfully")
	return nil
}
func ( d * Database ) CreateModel ( model interface { } ) error { err := d . DB . CreateTable ( model , & orm . CreateTableOptions { IfNotExists : true , } ) if err != nil { d . Error ( " " , " " , err ) return errors . New ( " " + err . Error ( ) ) } d . Success ( " " , " " ) return nil }
CreateModel attempts add the given model to database.
CreateModel attempts add the given model to database .