medol-be/app/database/entity/users.entity.go

27 lines
1.4 KiB
Go

package entity
import "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"`
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"`
KeycloakId string `json:"keycloak_id" gorm:"type:varchar"`
UserRoleId int `json:"user_role_id" gorm:"type:int4"`
StatusId int `json:"status_id" gorm:"type:int4"`
UserLevelsId int `json:"user_levels_id" gorm:"type:int4"`
CreatedById int `json:"created_by_id" gorm:"type:int4"`
ProfilePicturePath string `json:"profile_picture_path" gorm:"type:varchar"`
IsActive bool `json:"is_active" gorm:"type:bool"`
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
}