draftsurat

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

Documentation

Index

Constants

View Source
const EndPoint = "draft_surat"

Variables

This section is empty.

Functions

func ApprovalGetByIDHandler

func ApprovalGetByIDHandler(c *fiber.Ctx) error

func ApprovalGetListHandler

func ApprovalGetListHandler(c *fiber.Ctx) error

func ApprovalPartialyUpdateByIDHandler

func ApprovalPartialyUpdateByIDHandler(c *fiber.Ctx) error

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 GetApproval

func GetApproval(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 *ApprovalDetailAll) error

func UpdateByID

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

func UpdateByIDHandler

func UpdateByIDHandler(c *fiber.Ctx) error

Types

type ApprovalDetail

type ApprovalDetail struct {
	db.Model
	ID          db.NullInt64    `json:"id"                  db:"ad.id"            gorm:"column:id;primaryKey;autoIncrement" form:"id"`
	DraftID     db.NullInt64    `json:"-"                   db:"ad.draft_id"      gorm:"column:draft_id"                    form:"draft_id"`
	JabatanID   db.NullInt64    `` /* 169-byte string literal not displayed */
	DariPmkName db.NullString   `json:"jabatan.nama"        db:"jabatan.pmk_nama" gorm:"-"`
	Level       db.NullInt64    `` /* 163-byte string literal not displayed */
	IsVisible   db.NullBool     `json:"is_visible"          db:"ad.is_visible"    gorm:"column:is_visible"                  form:"is_visible"`
	Status      db.NullString   `` /* 164-byte string literal not displayed */
	Keterangan  db.NullString   `json:"keterangan"          db:"ad.keterangan"    gorm:"column:keterangan"                  form:"keterangan"`
	UpdatedAt   db.NullDateTime `json:"updated_at"          db:"ad.updated_at"    gorm:"column:updated_at"                  form:"updated_at"`
	UpdatedBy   db.NullInt64    `json:"updated_by"          db:"ad.updated_by"    gorm:"column:updated_by"                  form:"updated_by"`
	Username    db.NullString   `json:"updated_by.username" db:"u.username"       gorm:"-"`
}

func (*ApprovalDetail) SetFilter

func (pd *ApprovalDetail) SetFilter()

func (*ApprovalDetail) SetRelation

func (pd *ApprovalDetail) SetRelation()

func (*ApprovalDetail) SetSort

func (pd *ApprovalDetail) SetSort()

func (ApprovalDetail) TableAliasName

func (ApprovalDetail) TableAliasName() string

func (ApprovalDetail) TableName

func (ApprovalDetail) TableName() string

func (ApprovalDetail) TableVersion

func (ApprovalDetail) TableVersion() string

type ApprovalDetailAll

type ApprovalDetailAll struct {
	db.Model
	ID                      db.NullInt64    `json:"id"                     db:"ad.id"            gorm:"column:id;primaryKey;autoIncrement" form:"id"`
	DraftID                 db.NullInt64    `json:"draft.id"               db:"ad.draft_id"      gorm:"column:draft_id"                    form:"draft_id"`
	NomorSurat              db.NullString   `json:"draft.nomor_surat"      db:"ds.nomor_surat"   gorm:"-"                                  form:"-"`
	Perihal                 db.NullText     `json:"draft.perihal_surat"    db:"ds.perihal_surat" gorm:"-"                                  form:"-"`
	IsiSurat                db.NullText     `json:"draft.isi_surat"        db:"ds.isi_surat"     gorm:"-"                                  form:"-"`
	FileURL                 db.NullString   `json:"draft.file"             db:"ds.file"          gorm:"-"                                  form:"-"`
	DraftStatus             db.NullString   `json:"draft.status"           db:"ds.status"        gorm:"-"                                  form:"-"`
	DraftCreatedByID        db.NullInt64    `json:"requested_by.id"        db:"ds.created_by"    gorm:"-"                                  form:"created_by"`
	DraftCreatedByFirstname db.NullString   `json:"requested_by.firstname" db:"u.first_name"     gorm:"-"                                  form:"-"`
	JabatanID               db.NullInt64    `json:"-"                      db:"ad.jabatan_id"    gorm:"column:jabatan_id"                  form:"jabatan[id]"`
	Level                   db.NullInt64    `json:"level"                  db:"ad.level"         gorm:"column:level"                       form:"level"`
	IsVisible               db.NullBool     `json:"is_visible"             db:"ad.is_visible"    gorm:"column:is_visible"                  form:"is_visible"`
	Status                  db.NullString   `` /* 166-byte string literal not displayed */
	Keterangan              db.NullString   `json:"keterangan"             db:"ad.keterangan"    gorm:"column:keterangan"                  form:"keterangan"`
	UpdatedAt               db.NullDateTime `json:"updated_at"             db:"ad.updated_at"    gorm:"column:updated_at"                  form:"updated_at"`
	UpdatedBy               db.NullInt64    `json:"updated_by"             db:"ad.updated_by"    gorm:"column:updated_by"                  form:"updated_by"`
	Username                db.NullString   `json:"updated_by.username"    db:"us.username"      gorm:"-"`
}

func GetByIDApproval

func GetByIDApproval(ctx *app.Ctx, id string, query url.Values) (ApprovalDetailAll, error)

func (*ApprovalDetailAll) SetFilter

func (pd *ApprovalDetailAll) SetFilter()

func (*ApprovalDetailAll) SetRelation

func (pd *ApprovalDetailAll) SetRelation()

func (*ApprovalDetailAll) SetSort

func (pd *ApprovalDetailAll) SetSort()

func (ApprovalDetailAll) TableAliasName

func (ApprovalDetailAll) TableAliasName() string

func (ApprovalDetailAll) TableName

func (ApprovalDetailAll) TableName() string

func (ApprovalDetailAll) TableVersion

func (ApprovalDetailAll) TableVersion() string

type DataHistory

type DataHistory struct {
	db.Model
	ID           db.NullInt64    `json:"id"            db:"h.id"                 gorm:"column:id;primaryKey;autoIncrement" form:"id"`
	DraftID      db.NullInt64    `json:"draft.id"      db:"h.draft_id"           gorm:"column:draft_id"                    form:"draft_id"`
	FileURL      db.NullString   `json:"file"          db:"h.file"               gorm:"column:file"                        form:"file"`
	DataTemplate db.NullJSON     `json:"data_template" db:"h.data_template~json" gorm:"column:data_template"               form:"data_template"`
	CreatedByID  db.NullInt64    `json:"created_by.id" db:"h.created_by"         gorm:"column:created_by"                  form:"created_by"`
	CreatedAt    db.NullDateTime `json:"created_at"    db:"h.created_at"         gorm:"column:created_at"                  form:"created_at"`
}

func (DataHistory) TableAliasName

func (DataHistory) TableAliasName() string

func (DataHistory) TableName

func (DataHistory) TableName() string

func (DataHistory) TableVersion

func (DataHistory) TableVersion() string

type DraftSurat

type DraftSurat struct {
	db.Model
	ID                db.NullInt64          `json:"id"                  db:"ds.id"                 gorm:"column:id;primaryKey"    form:"id"`
	NomorSurat        db.NullString         `json:"nomor_surat"         db:"ds.nomor_surat"        gorm:"column:nomor_surat"      form:"nomor_surat"`
	Perihal           db.NullText           `json:"perihal_surat"       db:"ds.perihal_surat"      gorm:"column:perihal_surat"    form:"perihal_surat"`
	IsiSurat          db.NullText           `json:"isi_surat"           db:"ds.isi_surat"          gorm:"column:isi_surat"        form:"isi_surat"`
	FileURL           db.NullString         `json:"file"                db:"ds.file"               gorm:"column:file"             form:"file"`
	File              *multipart.FileHeader `json:"-"                   db:"-"                     gorm:"-"                       form:"-"`
	Status            db.NullString         `json:"status"              db:"ds.status"             gorm:"column:status"           form:"status"`
	IsNumbered        db.NullBool           `json:"is_numbered"         db:"ds.is_numbered"        gorm:"column:is_numbered"      form:"-"`
	IsNeedApproval    db.NullBool           `json:"is_need_approval"    db:"ds.is_need_approval"   gorm:"column:is_need_approval" form:"-"`
	Approval          []ApprovalDetail      `json:"approvals"           db:"ad.draft_id=id"        gorm:"-"                       form:"approvals"`
	IsNeedEsign       db.NullBool           `json:"is_need_esign"       db:"ds.is_need_esign"      gorm:"column:is_need_esign"    form:"-"`
	HalamanEsign      db.NullString         `json:"halaman_esign"       db:"ds.halaman_esign"      gorm:"column:halaman_esign"    form:"-"`
	Esign             []EsignDetail         `json:"esigns"              db:"de.draft_id=id"        gorm:"-"                       form:"esigns"`
	Histories         []DataHistory         `json:"histories"           db:"h.draft_id=id"         gorm:"-"                       form:"histories"`
	DataTemplate      db.NullJSON           `json:"data_template"       db:"ds.data_template~json" gorm:"column:data_template"    form:"data_template"`
	CreatedByID       db.NullInt64          `json:"created_by.id"       db:"ds.created_by"         gorm:"column:created_by"       form:"created_by"`
	CreatedByUsername db.NullString         `json:"created_by.username" db:"u.username"            gorm:"-"`
	CreatedAt         db.NullDateTime       `json:"created_at"          db:"ds.created_at"         gorm:"column:created_at"       form:"created_at"`
}

func GetByID

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

func (*DraftSurat) SetFilter

func (ds *DraftSurat) SetFilter()

func (*DraftSurat) SetRelation

func (ds *DraftSurat) SetRelation()

func (*DraftSurat) SetSort

func (ds *DraftSurat) SetSort()

func (DraftSurat) TableAliasName

func (DraftSurat) TableAliasName() string

func (DraftSurat) TableName

func (DraftSurat) TableName() string

func (DraftSurat) TableVersion

func (DraftSurat) TableVersion() string

type EsignDetail

type EsignDetail struct {
	db.Model
	ID                        db.NullInt64    `json:"id"                           db:"de.id"            gorm:"column:id;primaryKey;autoIncrement" form:"id"`
	DraftID                   db.NullInt64    `json:"draft.id"                     db:"de.draft_id"      gorm:"column:draft_id"                    form:"draft_id"`
	NomorSurat                db.NullString   `json:"draft.nomor_surat"            db:"ds.nomor_surat"   gorm:"-"                                  form:"-"`
	HalamanEsign              db.NullString   `json:"draft.halaman_esign"          db:"ds.halaman_esign" gorm:"-"                                  form:"-"`
	Perihal                   db.NullText     `json:"draft.perihal_surat"          db:"ds.perihal_surat" gorm:"-"                                  form:"-"`
	IsiSurat                  db.NullText     `json:"draft.isi_surat"              db:"ds.isi_surat"     gorm:"-"                                  form:"-"`
	FileURL                   db.NullString   `json:"draft.file"                   db:"ds.file"          gorm:"-"                                  form:"-"`
	Status                    db.NullString   `json:"draft.status"                 db:"ds.status"        gorm:"-"                                  form:"-"`
	UserID                    db.NullInt64    `` /* 135-byte string literal not displayed */
	UserUsername              db.NullString   `json:"user.username"                db:"u.username"       gorm:"-"`
	UserJobTitle              db.NullString   `json:"user.jobtitle"                db:"u.job_title"      gorm:"-"`
	UserFirstName             db.NullString   `json:"user.firstname"               db:"u.first_name"     gorm:"-"`
	UserPhone                 db.NullString   `json:"user.phone"                   db:"u.phone"          gorm:"-"`
	UserParentPmkId           db.NullInt64    `json:"user.parent_jabatan.id"       db:"u.staff_pmk_id"   gorm:"-"`
	UserParentPmkName         db.NullString   `json:"user.parent_jabatan.name"     db:"pj.pmk_nama"      gorm:"-"`
	UserJabatanUtamaID        db.NullInt64    `json:"user.jabatan_utama.id"        db:"ju.pmk_id"        gorm:"-"`
	UserJabatanUtamaName      db.NullString   `json:"user.jabatan_utama.name"      db:"ju.pmk_nama"      gorm:"-"`
	UserSekretarisJabatanID   db.NullInt64    `json:"user.jabatan_sekretaris.id"   db:"js.pmk_id"        gorm:"-"`
	UserSekretarisJabatanName db.NullString   `json:"user.jabatan_sekretaris.name" db:"js.pmk_nama"      gorm:"-"`
	UserNIK                   db.NullString   `json:"user.nik"                     db:"u.nik"            gorm:"-"`
	Mark                      db.NullString   `` /* 132-byte string literal not displayed */
	SignedAt                  db.NullDateTime `json:"signed_at"                    db:"de.signed_at"     gorm:"column:signed_at"                   form:"signed_at"`
	IsSigned                  db.NullBool     `json:"is_signed"                    db:"de.is_signed"     gorm:"column:is_signed"                   form:"is_signed"`
	UpdatedAt                 db.NullDateTime `json:"updated_at"                   db:"de.updated_at"    gorm:"column:updated_at"                  form:"updated_at"`
}

TODO : Relasikan ke esign detail

func (*EsignDetail) SetFilter

func (pd *EsignDetail) SetFilter()

func (*EsignDetail) SetRelation

func (pd *EsignDetail) SetRelation()

func (*EsignDetail) SetSort

func (pd *EsignDetail) SetSort()

func (EsignDetail) TableAliasName

func (EsignDetail) TableAliasName() string

func (EsignDetail) TableName

func (EsignDetail) TableName() string

func (EsignDetail) TableVersion

func (EsignDetail) TableVersion() string

type ParamCreate

type ParamCreate struct {
	DraftSurat
	DataTemplate db.NullString `json:"data_template" db:"ds.data_template~json" gorm:"column:data_template" form:"data_template"`
	Status       db.NullString `` /* 147-byte string literal not displayed */
	NomorSurat   db.NullString `` /* 152-byte string literal not displayed */
	Perihal      db.NullText   `` /* 154-byte string literal not displayed */
	IsiSurat     db.NullText   `` /* 150-byte string literal not displayed */
}

type ParamDelete

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

type ParamPartialyUpdate

type ParamPartialyUpdate struct {
	DraftSurat
	DataTemplate db.NullString `json:"data_template" db:"ds.data_template~json" gorm:"column:data_template" form:"data_template"`
	NomorSurat   db.NullString `json:"nomor_surat"   db:"ds.nomor_surat"        gorm:"column:nomor_surat"   validate:"required" form:"nomor_surat"`
	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 PersetujuanList

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

Jump to

Keyboard shortcuts

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