20 lines
907 B
Go
20 lines
907 B
Go
package entity
|
|
|
|
import (
|
|
"narasi-ahli-be/app/database/entity/users"
|
|
"time"
|
|
)
|
|
|
|
type EducationHistory struct {
|
|
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
|
UserID uint `json:"user_id" gorm:"type:int4;not null;index"`
|
|
SchoolName string `json:"school_name" gorm:"type:varchar;not null"`
|
|
Major string `json:"major" gorm:"type:varchar;not null"`
|
|
EducationLevel string `json:"education_level" gorm:"type:varchar;not null"`
|
|
GraduationYear int `json:"graduation_year" gorm:"type:int4;not null"`
|
|
CertificateImage *string `json:"certificate_image" gorm:"type:varchar"`
|
|
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
|
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
|
User *users.Users `json:"user" gorm:"foreignKey:UserID;references:ID"`
|
|
}
|