package model

import (
	"time"

	"gorm.io/gorm"
)

type BaseModel struct {
	ID        uint      `gorm:"primarykey" json:"id"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

func AutoMigrate(db *gorm.DB) *gorm.DB {
	db.AutoMigrate(&ProjectModel{})
	db.AutoMigrate(&TaskModel{})
	db.AutoMigrate(&VulnerabilityModel{})

	return db
}
