run_process_entity.go 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. You may not really want to edit it.
  3. // ==========================================================================
  4. package wf_run_process
  5. import (
  6. "database/sql"
  7. "github.com/gogf/gf/database/gdb"
  8. )
  9. // Entity is the golang structure for table wf_run_process.
  10. type Entity struct {
  11. Id uint `orm:"id,primary" json:"id"` //
  12. Uid uint `orm:"uid" json:"uid"` //
  13. RunId uint `orm:"run_id" json:"run_id"` // 当前流转id
  14. RunFlow uint `orm:"run_flow" json:"run_flow"` // 属于那个流程的id
  15. RunFlowProcess uint `orm:"run_flow_process" json:"run_flow_process"` // 当前步骤编号
  16. ParentFlow uint `orm:"parent_flow" json:"parent_flow"` // 上一步流程
  17. ParentFlowProcess uint `orm:"parent_flow_process" json:"parent_flow_process"` // 上一步骤号
  18. RunChild uint `orm:"run_child" json:"run_child"` // 开始转入子流程run_id 如果转入子流程,则在这里也记录
  19. Remark string `orm:"remark" json:"remark"` // 备注
  20. IsReceiveType uint `orm:"is_receive_type" json:"is_receive_type"` // 是否先接收人为主办人
  21. AutoPerson int `orm:"auto_person" json:"auto_person"` //
  22. SponsorText string `orm:"sponsor_text" json:"sponsor_text"` //
  23. SponsorIds string `orm:"sponsor_ids" json:"sponsor_ids"` //
  24. IsSponsor uint `orm:"is_sponsor" json:"is_sponsor"` // 是否步骤主办人 0否(默认) 1是
  25. IsSingpost uint `orm:"is_singpost" json:"is_singpost"` // 是否已会签过
  26. IsBack uint `orm:"is_back" json:"is_back"` // 被退回的 0否(默认) 1是
  27. Status uint `orm:"status" json:"status"` // 状态 0为未接收(默认),1为办理中 ,2为已转交,3为已结束4为已打回
  28. JsTime uint `orm:"js_time" json:"js_time"` // 接收时间
  29. BlTime uint `orm:"bl_time" json:"bl_time"` // 办理时间
  30. JjTime uint `orm:"jj_time" json:"jj_time"` // 转交时间,最后一步等同办结时间
  31. IsDel uint `orm:"is_del" json:"is_del"` //
  32. Updatetime uint `orm:"updatetime" json:"updatetime"` //
  33. Dateline uint `orm:"dateline" json:"dateline"` //
  34. WfMode int `orm:"wf_mode" json:"wf_mode"` //
  35. WfAction string `orm:"wf_action" json:"wf_action"` //
  36. }
  37. // OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
  38. // the data and where attributes for empty values.
  39. func (r *Entity) OmitEmpty() *arModel {
  40. return Model.Data(r).OmitEmpty()
  41. }
  42. // Inserts does "INSERT...INTO..." statement for inserting current object into table.
  43. func (r *Entity) Insert() (result sql.Result, err error) {
  44. return Model.Data(r).Insert()
  45. }
  46. // InsertIgnore does "INSERT IGNORE INTO ..." statement for inserting current object into table.
  47. func (r *Entity) InsertIgnore() (result sql.Result, err error) {
  48. return Model.Data(r).InsertIgnore()
  49. }
  50. // Replace does "REPLACE...INTO..." statement for inserting current object into table.
  51. // If there's already another same record in the table (it checks using primary key or unique index),
  52. // it deletes it and insert this one.
  53. func (r *Entity) Replace() (result sql.Result, err error) {
  54. return Model.Data(r).Replace()
  55. }
  56. // Save does "INSERT...INTO..." statement for inserting/updating current object into table.
  57. // It updates the record if there's already another same record in the table
  58. // (it checks using primary key or unique index).
  59. func (r *Entity) Save() (result sql.Result, err error) {
  60. return Model.Data(r).Save()
  61. }
  62. // Update does "UPDATE...WHERE..." statement for updating current object from table.
  63. // It updates the record if there's already another same record in the table
  64. // (it checks using primary key or unique index).
  65. func (r *Entity) Update() (result sql.Result, err error) {
  66. return Model.Data(r).Where(gdb.GetWhereConditionOfStruct(r)).Update()
  67. }
  68. // Delete does "DELETE FROM...WHERE..." statement for deleting current object from table.
  69. func (r *Entity) Delete() (result sql.Result, err error) {
  70. return Model.Where(gdb.GetWhereConditionOfStruct(r)).Delete()
  71. }