karyawan

package
v0.0.0-...-db28b0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2023 License: Unlicense Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const EndPoint = "karyawan"

Variables

This section is empty.

Functions

func Create

func Create(ctx *app.Ctx, param *ParamCreate) error

func CreateHandler

func CreateHandler(c *fiber.Ctx) error

func DeleteByID

func DeleteByID(ctx *app.Ctx, id string, param ParamDelete) error

func DeleteByIDHandler

func DeleteByIDHandler(c *fiber.Ctx) error

func Get

func Get(ctx *app.Ctx, query url.Values) (app.ListModel, error)

func GetByIDHandler

func GetByIDHandler(c *fiber.Ctx) error

func GetListHandler

func GetListHandler(c *fiber.Ctx) error

func PartialyUpdateByID

func PartialyUpdateByID(ctx *app.Ctx, id string, param *ParamPartialyUpdate) error

func PartialyUpdateByIDHandler

func PartialyUpdateByIDHandler(c *fiber.Ctx) error

func UpdateByID

func UpdateByID(ctx *app.Ctx, id string, param *ParamUpdate) error

func UpdateByIDHandler

func UpdateByIDHandler(c *fiber.Ctx) error

Types

type Karyawan

type Karyawan struct {
	db.Model
	ID          db.NullInt64  `json:"id"           db:"k.dk_id"       gorm:"column:dk_id;primaryKey" form:"id"`
	NIK         db.NullString `json:"nik"          db:"k.dk_nik"      gorm:"column:dk_nik"           form:"nik"`
	FullName    db.NullString `json:"fullname"     db:"k.dk_fullname" gorm:"column:dk_fullname"      form:"fullname"`
	JobPosition db.NullString `json:"job_position" db:"k.dk_jabatan"  gorm:"column:dk_jabatan"       form:"job_position"`
	JobLevel    db.NullString `json:"job_level"    db:"k.dk_pangkat"  gorm:"column:dk_pangkat"       form:"job_level"`
	Email       db.NullString `json:"email"        db:"k.dk_email"    gorm:"column:dk_email"         form:"email"`
}

func GetByID

func GetByID(ctx *app.Ctx, id string, query url.Values) (Karyawan, error)

func (*Karyawan) SetFilter

func (k *Karyawan) SetFilter()

func (*Karyawan) SetRelation

func (k *Karyawan) SetRelation()

func (*Karyawan) SetSort

func (k *Karyawan) SetSort()

func (Karyawan) TableAliasName

func (Karyawan) TableAliasName() string

func (Karyawan) TableName

func (Karyawan) TableName() string

func (Karyawan) TableVersion

func (Karyawan) TableVersion() string

type KaryawanList

type KaryawanList struct {
	app.ListModel
	Results []Karyawan `json:"results"`
}

type ParamCreate

type ParamCreate struct {
	Karyawan
	NIK      db.NullString `json:"nik"      db:"k.dk_nik"      gorm:"column:dk_nik"      validate:"required" form:"nik"`
	FullName db.NullString `json:"fullname" db:"k.dk_fullname" gorm:"column:dk_fullname" validate:"required" form:"fullname"`
	Email    db.NullString `json:"email"    db:"k.dk_email"    gorm:"column:dk_email"    validate:"required" form:"email"`
}

type ParamDelete

type ParamDelete struct {
	Karyawan
	Reason db.NullString `json:"reason" gorm:"-" validate:"required" form:"reason"`
}

type ParamPartialyUpdate

type ParamPartialyUpdate struct {
	Karyawan
	Reason db.NullString `json:"reason" gorm:"-" validate:"required" form:"reason"`
}

type ParamUpdate

type ParamUpdate struct {
	ParamCreate
	Reason db.NullString `json:"reason" gorm:"-" validate:"required" form:"reason"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL