Files
atahango/internal/models/resume.go
Beyhan Oğur bbbf76b184 first commit
2026-04-26 21:35:24 +03:00

32 lines
1.3 KiB
Go

package models
import (
"time"
"github.com/google/uuid"
)
// Resume model structure
// Represents resume section headers.
type Resume struct {
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
Title string `gorm:"type:varchar(254);not null" json:"title"`
TitleSub string `gorm:"type:varchar(254);not null" json:"title_sub"`
Education string `gorm:"type:varchar(100);default:Education" json:"education"`
Experience string `gorm:"type:varchar(100);default:Experience" json:"experience"`
CodingSkills string `gorm:"type:varchar(100);default:Coding Skills" json:"coding_skills"`
Knowledge string `gorm:"type:varchar(100);default:Knowledge" json:"knowledge"`
IsActive bool `gorm:"default:false" json:"is_active"`
Educations []Education `gorm:"foreignKey:ResumeID" json:"educations,omitempty"`
Experiences []Experience `gorm:"foreignKey:ResumeID" json:"experiences,omitempty"`
Skills []Skill `gorm:"foreignKey:ResumeID" json:"skills,omitempty"`
Knowledges []Knowledge `gorm:"foreignKey:ResumeID" json:"knowledges,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// TableName overrides the table name used by Resume to `resumes`
func (Resume) TableName() string {
return "resumes"
}