Documentation ¶
Index ¶
- Constants
- func Create(ctx *app.Ctx, param *ParamCreate) error
- func CreateHandler(c *fiber.Ctx) error
- func DeleteByID(ctx *app.Ctx, id string, param ParamDelete) error
- func DeleteByIDHandler(c *fiber.Ctx) error
- func Get(ctx *app.Ctx, query url.Values) (app.ListModel, error)
- func GetByIDHandler(c *fiber.Ctx) error
- func GetListHandler(c *fiber.Ctx) error
- func PartialyUpdateByID(ctx *app.Ctx, id string, param *ParamPartialyUpdate) error
- func PartialyUpdateByIDHandler(c *fiber.Ctx) error
- func UpdateByID(ctx *app.Ctx, id string, param *ParamUpdate) error
- func UpdateByIDHandler(c *fiber.Ctx) error
- type ParamCreate
- type ParamDelete
- type ParamPartialyUpdate
- type ParamUpdate
- type Penugasan
- type PenugasanDetail
- type PenugasanList
Constants ¶
View Source
const EndPoint = "penugasan"
Variables ¶
This section is empty.
Functions ¶
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 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 ParamCreate ¶
type ParamCreate struct { Penugasan Judul db.NullString `json:"judul" db:"p.tp_judul" gorm:"column:tp_judul" validate:"required" form:"judul"` Nomor db.NullString `json:"nomor" db:"p.tp_nomor" gorm:"column:tp_nomor" validate:"required" form:"nomor"` Date db.NullString `json:"tanggal" db:"p.tp_tanggal" gorm:"column:tp_tanggal" validate:"required" form:"tanggal"` }
type ParamDelete ¶
type ParamDelete struct { Penugasan Reason db.NullString `json:"reason" gorm:"-" validate:"required" form:"reason"` }
type ParamPartialyUpdate ¶
type ParamPartialyUpdate struct { Penugasan Date db.NullString `json:"tanggal" db:"p.tp_tanggal" gorm:"column:tp_tanggal" form:"tanggal"` 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"` }
type Penugasan ¶
type Penugasan struct { db.Model ID db.NullInt64 `json:"id" db:"p.tp_id" gorm:"column:tp_id;primaryKey" form:"id"` Staffs []PenugasanDetail `json:"staff" db:"pd.tpd_tp_id=id" gorm:"-" form:"staff"` TypeSurat db.NullString `json:"jenis" db:"p.tp_jenis" gorm:"column:tp_jenis" validate:"omitempty,oneof='SK' 'ST'" form:"jenis"` Judul db.NullString `json:"judul" db:"p.tp_judul" gorm:"column:tp_judul" form:"judul"` Nomor db.NullString `json:"nomor" db:"p.tp_nomor" gorm:"column:tp_nomor" form:"nomor"` Date db.NullDate `json:"tanggal" db:"p.tp_tanggal" gorm:"column:tp_tanggal" form:"tanggal"` FileURL db.NullString `json:"file" db:"p.tp_file" gorm:"column:tp_file" form:"file"` FileName db.NullString `json:"filename" db:"p.tp_file_name" gorm:"column:tp_file_name" form:"-"` File *multipart.FileHeader `json:"-" db:"-" gorm:"-" form:"-"` CreatedByID db.NullInt64 `json:"-" db:"p.tp_created_by" gorm:"column:tp_created_by" form:"-"` IsDeleted db.NullBool `json:"is_deleted" db:"p.tp_hapus" gorm:"column:tp_hapus" form:"is_deleted"` }
func (*Penugasan) SetRelation ¶
func (p *Penugasan) SetRelation()
func (Penugasan) TableAliasName ¶
func (Penugasan) TableVersion ¶
type PenugasanDetail ¶
type PenugasanDetail struct { db.Model ID db.NullInt64 `json:"-" db:"pd.tpd_id" gorm:"column:tpd_id;primaryKey;autoIncrement" form:"-"` UserID db.NullInt64 `json:"id" db:"pd.tpd_user_id" gorm:"column:tpd_user_id" form:"id"` PenugasanID db.NullInt64 `json:"-" db:"pd.tpd_tp_id" gorm:"column:tpd_tp_id" form:"-"` Username db.NullString `json:"username" db:"u.username" gorm:"-"` FirstName db.NullString `json:"firstname" db:"u.first_name" gorm:"-"` LastName db.NullString `json:"lastname" db:"u.last_name" gorm:"-"` Phone db.NullString `json:"phone" db:"u.phone" gorm:"-"` PictureUrl db.NullString `json:"picture" db:"u.picture" gorm:"-"` Email db.NullString `json:"email" db:"u.email" gorm:"-"` LdapUsername db.NullString `json:"ldap_username" db:"u.ldap_username" gorm:"-"` }
func (*PenugasanDetail) SetFilter ¶
func (pd *PenugasanDetail) SetFilter()
func (*PenugasanDetail) SetRelation ¶
func (pd *PenugasanDetail) SetRelation()
func (*PenugasanDetail) SetSort ¶
func (pd *PenugasanDetail) SetSort()
func (PenugasanDetail) TableAliasName ¶
func (PenugasanDetail) TableAliasName() string
func (PenugasanDetail) TableName ¶
func (PenugasanDetail) TableName() string
func (PenugasanDetail) TableVersion ¶
func (PenugasanDetail) TableVersion() string
type PenugasanList ¶
Click to show internal directories.
Click to hide internal directories.