39 lines
2.6 KiB
Go
39 lines
2.6 KiB
Go
package users
|
|
|
|
import (
|
|
userLevels "narasi-ahli-be/app/database/entity/user_levels"
|
|
"time"
|
|
)
|
|
|
|
type Users struct {
|
|
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
|
Username string `json:"username" gorm:"type:varchar"`
|
|
Email string `json:"email" gorm:"type:varchar"`
|
|
Fullname string `json:"fullname" gorm:"type:varchar"`
|
|
Address *string `json:"address" gorm:"type:varchar"`
|
|
PhoneNumber *string `json:"phone_number" gorm:"type:varchar"`
|
|
WorkType *string `json:"work_type" gorm:"type:varchar"`
|
|
GenderType *string `json:"gender_type" gorm:"type:varchar"`
|
|
IdentityType *string `json:"identity_type" gorm:"type:varchar"`
|
|
IdentityGroup *string `json:"identity_group" gorm:"type:varchar"`
|
|
IdentityGroupNumber *string `json:"identity_group_number" gorm:"type:varchar"`
|
|
IdentityNumber *string `json:"identity_number" gorm:"type:varchar"`
|
|
DateOfBirth *string `json:"date_of_birth" gorm:"type:varchar"`
|
|
LastEducation *string `json:"last_education" gorm:"type:varchar"`
|
|
Degree *string `json:"degree" gorm:"type:varchar"`
|
|
WhatsappNumber *string `json:"whatsapp_number" gorm:"type:varchar"`
|
|
LastJobTitle *string `json:"last_job_title" gorm:"type:varchar"`
|
|
UserRoleId uint `json:"user_role_id" gorm:"type:int4"`
|
|
UserLevelId uint `json:"user_level_id" gorm:"type:int4"`
|
|
UserLevel *userLevels.UserLevels `json:"user_levels" gorm:"foreignKey:UserLevelId;references:ID"`
|
|
KeycloakId *string `json:"keycloak_id" gorm:"type:varchar"`
|
|
StatusId *int `json:"status_id" gorm:"type:int4;default:1"`
|
|
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
|
ProfilePicturePath *string `json:"profile_picture_path" gorm:"type:varchar"`
|
|
TempPassword *string `json:"temp_password" gorm:"type:varchar"`
|
|
IsEmailUpdated *bool `json:"is_email_updated" gorm:"type:bool;default:false"`
|
|
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
|
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
|
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
|
}
|