github.com/eden-framework/sqlx@v0.0.2/datatypes/soft_delete.go (about)

     1  package datatypes
     2  
     3  import (
     4  	"github.com/eden-framework/enumeration"
     5  )
     6  
     7  type SoftDelete struct {
     8  	Enabled enumeration.Bool `db:"F_enabled" sql:"int(8) unsigned NOT NULL DEFAULT '1'" json:"-"`
     9  }
    10  
    11  func (e *SoftDelete) Enable() {
    12  	e.Enabled = enumeration.BOOL__TRUE
    13  }
    14  
    15  func (e *SoftDelete) Disable() {
    16  	e.Enabled = enumeration.BOOL__FALSE
    17  }