package entities

import (
	"time"

	"github.com/google/uuid"
)

type Department struct {
	ID        uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
	Name      string    `gorm:"not null" json:"name"`
	Code      string    `json:"code,omitempty"`
	Path      string    `gorm:"not null" json:"path"`
	CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
	UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
}

func (Department) TableName() string { return "departments" }
