31 lines
3.0 KiB
Go
31 lines
3.0 KiB
Go
package form
|
|
|
|
type ChangePasswordForm struct {
|
|
OldPassword string `json:"old_password" form:"old_password" xml:"old_password" example:"123456" validate:"required"` // Old password
|
|
NewPassword string `json:"new_password" form:"new_password" xml:"new_password" example:"123456" validate:"required"` // New password
|
|
NewPasswordRepeat string `json:"new_password_repeat" form:"new_password_repeat" xml:"new_password_repeat" example:"123456" validate:"required,eqfield=NewPassword"` // New password confirmation, must equal to password
|
|
}
|
|
type ChangePasswordFormPublik struct {
|
|
// IdDaerah int64 `json:"id_daerah" xml:"id_daerah" form:"id_daerah" example:"101" validate:"gte=0"` //Id daerah target user
|
|
// IdUser int64 `json:"id_user" xml:"id_user" form:"id_user" example:"18" validate:"gte=0"` //Id target user
|
|
Username string `json:"username" xml:"username" form:"username" example:"user" validate:"required"` // Username
|
|
OldPassword string `json:"old_password" xml:"old_password" form:"old_password" example:"123456" validate:"required"` // Old password
|
|
NewPassword string `json:"new_password" xml:"new_password" form:"new_password" example:"123456" validate:"required"` // New password
|
|
NewPasswordRepeat string `json:"new_password_repeat" xml:"new_password_repeat" form:"new_password_repeat" example:"123456" validate:"required"` // New password confirmation, must equal to password
|
|
}
|
|
|
|
type ChangeActiveStatusForm struct {
|
|
IdDaerah int64 `json:"id_daerah" xml:"id_daerah" form:"id_daerah" example:"101" validate:"gte=0"` //Id daerah target user
|
|
IdUser int64 `json:"id_user" xml:"id_user" form:"id_user" example:"18" validate:"gte=0"` //Id target user
|
|
Active int `json:"active" xml:"active" form:"active" example:"0" validate:"gte=0,lte=1"` //Active status. 0=Tidak Aktif, 1=Aktif
|
|
}
|
|
|
|
type UpdateUserProfileForm struct {
|
|
NamaUser string `json:"nama_user" form:"nama_user" xml:"nama_user" validate:"required" example:"Kab. Tanggamus"` // Nama User (Ex: Kab Tanggamus)
|
|
Nik string `json:"nik" form:"nik" xml:"nik" validate:"required,len=16" example:"123456789876543213"` // NIK
|
|
Npwp string `json:"npwp" form:"npwp" xml:"npwp" validate:"required" example:"123456789876543213"` // NPWP
|
|
Alamat string `json:"alamat" form:"alamat" xml:"alamat" example:"xxxx"` // Alamat
|
|
TglLahir string `json:"tgl_lahir" form:"tgl_lahir" xml:"tgl_lahir" example:"1945-08-17"` // Tanggal lahir
|
|
IdPangGol uint `json:"id_pang_gol" form:"id_pang_gol" xml:"id_pang_gol" validate:"required" example:"1"` // ID pangkat/golongan
|
|
}
|