controller

package
v0.0.0-...-d431e0b Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePresensiByID

func DeletePresensiByID(c *fiber.Ctx) error

DeletePresensiByID godoc @Summary Delete data presensi. @Description Hapus data presensi. @Tags Presensi @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 @Failure 400 @Failure 500 @Router /delete/{id} [delete]

func GetPresensi

func GetPresensi(c *fiber.Ctx) error

GetPresensi godoc @Summary Get All Data Presensi. @Description Mengambil semua data presensi. @Tags Presensi @Accept json @Produce json @Success 200 {object} Presensi @Router /presensi [get]

func GetPresensiID

func GetPresensiID(c *fiber.Ctx) error

GetPresensiID godoc @Summary Get By ID Data Presensi. @Description Ambil per ID data presensi. @Tags Presensi @Accept json @Produce json @Param id path string true "Masukan ID" @Success 200 {object} Presensi @Failure 400 @Failure 404 @Failure 500 @Router /presensi/{id} [get]

func Homepage

func Homepage(c *fiber.Ctx) error

func InsertDataPresensi

func InsertDataPresensi(c *fiber.Ctx) error

InsertDataPresensi godoc @Summary Insert data presensi. @Description Input data presensi. @Tags Presensi @Accept json @Produce json @Param request body ReqPresensi true "Payload Body [RAW]" @Success 200 {object} Presensi @Failure 400 @Failure 500 @Router /insert [post]

func Sink

func Sink(c *fiber.Ctx) error

func UpdateData

func UpdateData(c *fiber.Ctx) error

UpdateData godoc @Summary Update data presensi. @Description Ubah data presensi. @Tags Presensi @Accept json @Produce json @Param id path string true "Masukan ID" @Param request body ReqPresensi true "Payload Body [RAW]" @Success 200 {object} Presensi @Failure 400 @Failure 500 @Router /update/{id} [put]

Types

type HTTPRequest

type HTTPRequest struct {
	Header string `json:"header"`
	Body   string `json:"body"`
}

type JamKerja

type JamKerja struct {
	Durasi     int      `bson:"durasi,omitempty" json:"durasi,omitempty" example:"8"`
	Jam_masuk  string   `bson:"jam_masuk,omitempty" json:"jam_masuk,omitempty" example:"08:00"`
	Jam_keluar string   `bson:"jam_keluar,omitempty" json:"jam_keluar,omitempty" example:"16:00"`
	Gmt        int      `bson:"gmt,omitempty" json:"gmt,omitempty" example:"7"`
	Hari       []string `bson:"hari,omitempty" json:"hari,omitempty" example:"Senin,Selasa,Rabu,Kamis,Jumat,Sabtu,Minggu"`
	Shift      int      `bson:"shift,omitempty" json:"shift,omitempty" example:"2"`
	Piket_tim  string   `bson:"piket_tim,omitempty" json:"piket_tim,omitempty" example:"Piket Z"`
}

type Karyawan

type Karyawan struct {
	ID           primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty" example:"123456789"`
	Nama         string             `bson:"nama,omitempty" json:"nama,omitempty" example:"Tes Swagger"`
	Phone_number string             `bson:"phone_number,omitempty" json:"phone_number,omitempty" example:"08123456789"`
	Jabatan      string             `bson:"jabatan,omitempty" json:"jabatan,omitempty" example:"Anonymous"`
	Jam_kerja    []JamKerja         `bson:"jam_kerja,omitempty" json:"jam_kerja,omitempty"`
	Hari_kerja   []string           `bson:"hari_kerja,omitempty" json:"hari_kerja,omitempty" example:"Senin,Selasa,Rabu,Kamis,Jumat,Sabtu,Minggu"`
}

type Presensi

type Presensi struct {
	ID           primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty" example:"123456789"`
	Longitude    float64            `bson:"longitude,omitempty" json:"longitude,omitempty" example:"123.11"`
	Latitude     float64            `bson:"latitude,omitempty" json:"latitude,omitempty" example:"123.12"`
	Location     string             `bson:"location,omitempty" json:"location,omitempty" example:"Bandung"`
	Phone_number string             `bson:"phone_number,omitempty" json:"phone_number,omitempty" example:"08123456789"`
	Datetime     primitive.DateTime `bson:"datetime,omitempty" json:"datetime,omitempty" swaggertype:"string" example:"2024-09-01T00:00:00Z" format:"date-time"`
	Checkin      string             `bson:"checkin,omitempty" json:"checkin,omitempty" example:"Masuk"`
	Biodata      Karyawan           `bson:"biodata,omitempty" json:"biodata,omitempty"`
}

type ReqKaryawan

type ReqKaryawan struct {
	Nama         string     `bson:"nama,omitempty" json:"nama,omitempty" example:"Tes Swagger"`
	Phone_number string     `bson:"phone_number,omitempty" json:"phone_number,omitempty" example:"08123456789"`
	Jabatan      string     `bson:"jabatan,omitempty" json:"jabatan,omitempty" example:"Anonymous"`
	Jam_kerja    []JamKerja `bson:"jam_kerja,omitempty" json:"jam_kerja,omitempty"`
	Hari_kerja   []string   `bson:"hari_kerja,omitempty" json:"hari_kerja,omitempty" example:"Senin,Selasa,Rabu,Kamis,Jumat,Sabtu,Minggu"`
}

type ReqPresensi

type ReqPresensi struct {
	Longitude    float64     `bson:"longitude,omitempty" json:"longitude,omitempty" example:"123.11"`
	Latitude     float64     `bson:"latitude,omitempty" json:"latitude,omitempty" example:"123.12"`
	Location     string      `bson:"location,omitempty" json:"location,omitempty" example:"Bandung"`
	Phone_number string      `bson:"phone_number,omitempty" json:"phone_number,omitempty" example:"08123456789"`
	Checkin      string      `bson:"checkin,omitempty" json:"checkin,omitempty" example:"Masuk"`
	Biodata      ReqKaryawan `bson:"biodata,omitempty" json:"biodata,omitempty"`
}

Jump to

Keyboard shortcuts

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