github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/internal/server/model/base.go (about)

     1  package model
     2  
     3  import (
     4  	"time"
     5  )
     6  
     7  type BaseModel struct {
     8  	//gorm.Model
     9  
    10  	ID        uint       `gorm:"primary_key" sql:"type:INT(10) UNSIGNED NOT NULL" json:"id"`
    11  	CreatedAt *time.Time `json:"createdAt,omitempty"`
    12  	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
    13  
    14  	Deleted  bool `json:"-" gorm:"default:false"`
    15  	Disabled bool `json:"disabled,omitempty" gorm:"default:false"`
    16  }