Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetAllLeavesResponse ¶
type GetAllLeavesResponse struct {
Leaves []Leave `json:"leaves"`
}
GetAllLeavesResponse Model
type GetLeavesResponse ¶
GetLeavesResponse Model
type JWTClaims ¶
type JWTClaims struct { UserID int `json:"userID"` RoleID int `json:"roleID"` jwt.StandardClaims }
JWTClaims describes Claims in token.
type Leave ¶
type Leave struct { ID int `gorm:"id;PRIMARY_KEY;AUTO_INCREMENT" json:"id,omitempty"` UserID int `gorm:"user_id" json:"userID,omitempty"` Status string `gorm:"status" json:"status,omitempty"` LeaveReason string `gorm:"leave_reason" json:"leaveReason,omitempty"` Feedback string `gorm:"feedback" json:"feedback,omitempty"` FromDate time.Time `gorm:"from_date" json:"fromDate,omitempty"` ToDate time.Time `gorm:"to_date" json:"toDate,omitempty"` LeaveDays int `gorm:"leave_days" json:"leaveDays,omitempty"` CreatedAt time.Time `gorm:"created_at" json:"-"` }
Leave Model
type Role ¶
type Role struct { ID int `gorm:"id" json:"id"` RoleName string `gorm:"role_name" json:"roleName"` }
Role Model
type User ¶
type User struct { ID int `gorm:"id" json:"id"` Name string `gorm:"name" json:"name"` Email string `gorm:"email" json:"email"` Password string `gorm:"password" json:"-"` RoleID int `gorm:"role_id" json:"roleID"` TotalLeaves int `gorm:"total_leaves" json:"totalLeaves"` CreatedAt time.Time `gorm:"created_at" json:"createdAt"` UpdatedAt time.Time `gorm:"updated_at" json:"-"` DeletedAt *time.Time `gorm:"deleted_at" json:"-"` }
User Model
type UserLoginRequest ¶
type UserLoginRequest struct { Email string `json:"email" validate:"required" email:"true"` Password string `json:"password" validate:"required"` }
UserLoginRequest Model
type UserLoginResponse ¶
type UserLoginResponse struct {
Token string `json:"token"`
}
UserLoginResponse Model
Click to show internal directories.
Click to hide internal directories.