persetujuan

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: 21 Imported by: 0

Documentation

Index

Constants

View Source
const EndPoint = "persetujuan"

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 ParamCreate

type ParamCreate struct {
	Persetujuan
	Kode  db.NullString `json:"kode"  db:"p.t_pe_kode"  gorm:"column:t_pe_kode"  validate:"required" form:"kode"`
	Judul db.NullString `json:"judul" db:"p.t_pe_judul" gorm:"column:t_pe_judul" validate:"required" form:"judul"`
}

type ParamDelete

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

type ParamPartialyUpdate

type ParamPartialyUpdate struct {
	Persetujuan
	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 Persetujuan

type Persetujuan struct {
	db.Model
	ID           db.NullInt64          `json:"id"                       db:"p.t_pe_id"         gorm:"column:t_pe_id;primaryKey" form:"id"`
	Kode         db.NullString         `json:"kode"                     db:"p.t_pe_kode"       gorm:"column:t_pe_kode"          form:"kode"`
	Judul        db.NullString         `json:"judul"                    db:"p.t_pe_judul"      gorm:"column:t_pe_judul"         form:"judul"`
	FileURL      db.NullString         `json:"file"                     db:"p.t_pe_file"       gorm:"column:t_pe_file"          form:"file"`
	File         *multipart.FileHeader `json:"-"                        db:"-"                 gorm:"-"                         form:"-"`
	Keterangan   db.NullString         `json:"keterangan"               db:"p.t_pe_ket"        gorm:"column:t_pe_ket"           form:"keterangan"`
	Status       db.NullString         `json:"status"                   db:"p.t_pe_status"     gorm:"column:t_pe_status"        form:"status"`
	Staffs       []PersetujuanDetail   `json:"approvals"                db:"pd.t_ped_pe_id=id" gorm:"-"                         form:"approvals"`
	CreatedByID  db.NullInt64          `json:"created_by.id"            db:"p.t_pe_createdby"  gorm:"column:t_pe_createdby"     form:"created_by"`
	Username     db.NullString         `json:"created_by.username"      db:"u.username"        gorm:"-"`
	FirstName    db.NullString         `json:"created_by.firstname"     db:"u.first_name"      gorm:"-"`
	LastName     db.NullString         `json:"created_by.lastname"      db:"u.last_name"       gorm:"-"`
	Phone        db.NullString         `json:"created_by.phone"         db:"u.phone"           gorm:"-"`
	PictureUrl   db.NullString         `json:"created_by.picture"       db:"u.picture"         gorm:"-"`
	Email        db.NullString         `json:"created_by.email"         db:"u.email"           gorm:"-"`
	LdapUsername db.NullString         `json:"created_by.ldap_username" db:"u.ldap_username"   gorm:"-"`
	CreatedAt    db.NullDateTime       `json:"created_at"               db:"p.t_pe_created"    gorm:"column:t_pe_created"       form:"created_at"`
}

func GetByID

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

func (*Persetujuan) SetFilter

func (p *Persetujuan) SetFilter()

func (*Persetujuan) SetRelation

func (p *Persetujuan) SetRelation()

func (*Persetujuan) SetSort

func (p *Persetujuan) SetSort()

func (Persetujuan) TableAliasName

func (Persetujuan) TableAliasName() string

func (Persetujuan) TableName

func (Persetujuan) TableName() string

func (Persetujuan) TableVersion

func (Persetujuan) TableVersion() string

type PersetujuanDetail

type PersetujuanDetail struct {
	db.Model
	ID            db.NullInt64          `json:"id"            db:"pd.t_ped_id"              gorm:"column:t_ped_id;primaryKey;autoIncrement" form:"id"`
	UserID        db.NullInt64          `json:"user_id"       db:"pd.t_ped_user_id"         gorm:"column:t_ped_user_id"                     form:"user_id"`
	PersetujuanID db.NullInt64          `json:"-"             db:"pd.t_ped_pe_id"           gorm:"column:t_ped_pe_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:"-"`
	Level         db.NullInt64          `json:"level"         db:"pd.t_ped_level"           gorm:"column:t_ped_level"                       form:"level"`
	IsVisible     db.NullBool           `json:"is_visible"    db:"pd.t_ped_is_visible"      gorm:"column:t_ped_is_visible"                  form:"is_visible"`
	Status        db.NullString         `` /* 167-byte string literal not displayed */
	Keterangan    db.NullString         `json:"keterangan"    db:"pd.t_ped_ket"             gorm:"column:t_ped_ket"                         form:"keterangan"`
	FileURL       db.NullString         `json:"file"          db:"pd.t_ped_file"            gorm:"column:t_ped_file"                        form:"file"`
	File          *multipart.FileHeader `json:"-"             db:"-"                        gorm:"-"                                        form:"-"`
	Updated       db.NullDateTime       `json:"updated_at"    db:"pd.t_ped_update"          gorm:"column:t_ped_update"                      form:"updated_at"`
	UpdatedByID   db.NullInt64          `json:"-"             db:"pd.t_ped_updateby"        gorm:"column:t_ped_updateby"                    form:"-"`
}

func (*PersetujuanDetail) SetFilter

func (pd *PersetujuanDetail) SetFilter()

func (*PersetujuanDetail) SetRelation

func (pd *PersetujuanDetail) SetRelation()

func (*PersetujuanDetail) SetSort

func (pd *PersetujuanDetail) SetSort()

func (PersetujuanDetail) TableAliasName

func (PersetujuanDetail) TableAliasName() string

func (PersetujuanDetail) TableName

func (PersetujuanDetail) TableName() string

func (PersetujuanDetail) TableVersion

func (PersetujuanDetail) TableVersion() string

type PersetujuanList

type PersetujuanList struct {
	app.ListModel
	Results []Persetujuan `json:"results"`
}

Jump to

Keyboard shortcuts

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