58 lines
2.0 KiB
Go
58 lines
2.0 KiB
Go
package models
|
||
|
||
import "time"
|
||
|
||
type MkUser struct {
|
||
// ==================================================
|
||
// 🔑 PRIMARY ID (mk_dfusr.id)
|
||
// ==================================================
|
||
ID int64 `json:"id"` // mk_dfusr.id
|
||
RoleID int64 `json:"role_id"`
|
||
|
||
// ==================================================
|
||
// 🔁 LEGACY DFUSR (opsiyonel – migrate/debug)
|
||
// ==================================================
|
||
LegacyDfUsrID *int64 `json:"legacy_dfusr_id,omitempty"`
|
||
|
||
// ==================================================
|
||
// 👤 CORE
|
||
// ==================================================
|
||
Username string `json:"username"`
|
||
FullName string `json:"full_name"`
|
||
Email string `json:"email"`
|
||
Mobile string `json:"mobile"`
|
||
IsActive bool `json:"is_active"`
|
||
|
||
// ==================================================
|
||
// 🔐 AUTH
|
||
// ==================================================
|
||
PasswordHash string `json:"-"`
|
||
ForcePasswordChange bool `json:"force_password_change"`
|
||
PasswordUpdatedAt *time.Time `json:"password_updated_at,omitempty"`
|
||
SessionID string `json:"session_id"`
|
||
|
||
// ==================================================
|
||
// 🧩 ROLE
|
||
// ==================================================
|
||
RoleCode string `json:"role_code"`
|
||
|
||
// ==================================================
|
||
// 🧾 NEBIM
|
||
// ==================================================
|
||
V3Username string `json:"v3_username"`
|
||
V3UserGroup string `json:"v3_usergroup"`
|
||
|
||
// ==================================================
|
||
// 🏭 RUNTIME SCOPES
|
||
// ==================================================
|
||
DepartmentCodes []string `json:"departments"`
|
||
PiyasaCodes []string `json:"piyasalar"`
|
||
|
||
// ==================================================
|
||
// ⏱ AUDIT
|
||
// ==================================================
|
||
CreatedAt time.Time `json:"created_at"`
|
||
UpdatedAt time.Time `json:"updated_at"`
|
||
LastLoginAt *time.Time `json:"last_login_at,omitempty"`
|
||
}
|