first commit
This commit is contained in:
24
internal/models/skill.go
Normal file
24
internal/models/skill.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// Skill model structure
|
||||
// Represents a resume skill entry.
|
||||
type Skill struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
|
||||
Title string `gorm:"type:varchar(100);not null" json:"title"`
|
||||
Degree int `gorm:"not null" json:"degree"`
|
||||
ResumeID *uuid.UUID `gorm:"type:uuid" json:"resume_id,omitempty"`
|
||||
IsActive bool `gorm:"default:false" json:"is_active"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// TableName overrides the table name used by Skill to `skills`
|
||||
func (Skill) TableName() string {
|
||||
return "skills"
|
||||
}
|
||||
Reference in New Issue
Block a user