Files
autoglue/internal/db/models/common.go
2025-09-01 13:34:13 +01:00

14 lines
334 B
Go

package models
import (
"time"
"gorm.io/gorm"
)
type Timestamped struct {
CreatedAt time.Time `gorm:"column:created_at;not null;default:now()" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime;column:updated_at;not null;default:now()" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}