package model

import (
	"time"

	"gorm.io/gorm"
)

type Model struct {
	ID        uint           `gorm:"primarykey;autoIncrement" swaggerignore:"true" json:"id,omitempty" hidden:"true"`
	CreatedAt time.Time      `gorm:"not null;autoCreateTime" swaggerignore:"true" json:"-"`
	UpdatedAt time.Time      `gorm:"autoUpdateTime" swaggerignore:"true" json:"-"`
	DeletedAt gorm.DeletedAt `gorm:"index" swaggerignore:"true" json:"-"`
}

// Makes all objects embedding db.Model implementators of ModelWithID interface
func (m Model) ModelWithID() {
}
