gitee.com/eden-framework/sqlx@v0.0.3/datatypes/soft_delete.go (about) 1 package datatypes 2 3 import ( 4 "gitee.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 }