flow_process_entity.go 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. You may not really want to edit it.
  3. // ==========================================================================
  4. package wf_flow_process
  5. import (
  6. "database/sql"
  7. "github.com/gogf/gf/database/gdb"
  8. )
  9. // Entity is the golang structure for table wf_flow_process.
  10. type Entity struct {
  11. Id int `orm:"id,primary" json:"id"` //
  12. FlowId uint `orm:"flow_id" json:"flow_id"` // 流程ID
  13. ProcessName string `orm:"process_name" json:"process_name"` // 步骤名称
  14. ProcessType string `orm:"process_type" json:"process_type"` // 步骤类型
  15. ProcessTo string `orm:"process_to" json:"process_to"` // 转交下一步骤号
  16. AutoPerson uint `orm:"auto_person" json:"auto_person"` // 3自由选择|4指定人员|5指定角色|6事务接受
  17. AutoSponsorIds string `orm:"auto_sponsor_ids" json:"auto_sponsor_ids"` // 4指定步骤主办人ids
  18. AutoSponsorText string `orm:"auto_sponsor_text" json:"auto_sponsor_text"` // 4指定步骤主办人text
  19. WorkIds string `orm:"work_ids" json:"work_ids"` // 6事务接受
  20. WorkText string `orm:"work_text" json:"work_text"` // 6事务接受
  21. AutoRoleIds string `orm:"auto_role_ids" json:"auto_role_ids"` // 5角色ids
  22. AutoRoleText string `orm:"auto_role_text" json:"auto_role_text"` // 5角色 text
  23. RangeUserIds string `orm:"range_user_ids" json:"range_user_ids"` // 3自由选择IDS
  24. RangeUserText string `orm:"range_user_text" json:"range_user_text"` // 3自由选择用户ID
  25. IsSing uint `orm:"is_sing" json:"is_sing"` // 1允许|2不允许
  26. IsBack uint `orm:"is_back" json:"is_back"` // 1允许|2不允许
  27. OutCondition string `orm:"out_condition" json:"out_condition"` // 转出条件
  28. Setleft uint `orm:"setleft" json:"setleft"` // 左 坐标
  29. Settop uint `orm:"settop" json:"settop"` // 上 坐标
  30. Style string `orm:"style" json:"style"` // 样式 序列化
  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 uint `orm:"wf_mode" json:"wf_mode"` // 0 单一线性,1,转出条件 2,同步模式
  35. WfAction string `orm:"wf_action" json:"wf_action"` // 对应方法
  36. WorkSql string `orm:"work_sql" json:"work_sql"` //
  37. WorkMsg string `orm:"work_msg" json:"work_msg"` //
  38. }
  39. // OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
  40. // the data and where attributes for empty values.
  41. func (r *Entity) OmitEmpty() *arModel {
  42. return Model.Data(r).OmitEmpty()
  43. }
  44. // Inserts does "INSERT...INTO..." statement for inserting current object into table.
  45. func (r *Entity) Insert() (result sql.Result, err error) {
  46. return Model.Data(r).Insert()
  47. }
  48. // InsertIgnore does "INSERT IGNORE INTO ..." statement for inserting current object into table.
  49. func (r *Entity) InsertIgnore() (result sql.Result, err error) {
  50. return Model.Data(r).InsertIgnore()
  51. }
  52. // Replace does "REPLACE...INTO..." statement for inserting current object into table.
  53. // If there's already another same record in the table (it checks using primary key or unique index),
  54. // it deletes it and insert this one.
  55. func (r *Entity) Replace() (result sql.Result, err error) {
  56. return Model.Data(r).Replace()
  57. }
  58. // Save does "INSERT...INTO..." statement for inserting/updating current object into table.
  59. // It updates the record if there's already another same record in the table
  60. // (it checks using primary key or unique index).
  61. func (r *Entity) Save() (result sql.Result, err error) {
  62. return Model.Data(r).Save()
  63. }
  64. // Update does "UPDATE...WHERE..." statement for updating current object from table.
  65. // It updates the record if there's already another same record in the table
  66. // (it checks using primary key or unique index).
  67. func (r *Entity) Update() (result sql.Result, err error) {
  68. return Model.Data(r).Where(gdb.GetWhereConditionOfStruct(r)).Update()
  69. }
  70. // Delete does "DELETE FROM...WHERE..." statement for deleting current object from table.
  71. func (r *Entity) Delete() (result sql.Result, err error) {
  72. return Model.Where(gdb.GetWhereConditionOfStruct(r)).Delete()
  73. }