run_sign_entity.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. You may not really want to edit it.
  3. // ==========================================================================
  4. package wf_run_sign
  5. import (
  6. "database/sql"
  7. "github.com/gogf/gf/database/gdb"
  8. )
  9. // Entity is the golang structure for table wf_run_sign.
  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"` //
  14. RunFlow uint `orm:"run_flow" json:"run_flow"` // 流程ID,子流程时区分run step
  15. RunFlowProcess uint `orm:"run_flow_process" json:"run_flow_process"` // 当前步骤编号
  16. Content string `orm:"content" json:"content"` // 会签内容
  17. IsAgree uint `orm:"is_agree" json:"is_agree"` // 审核意见:1同意;2不同意
  18. SignAttId uint `orm:"sign_att_id" json:"sign_att_id"` //
  19. SignLook uint `orm:"sign_look" json:"sign_look"` // 步骤设置的会签可见性,0总是可见(默认),1本步骤经办人之间不可见2针对其他步骤不可见
  20. Dateline uint `orm:"dateline" json:"dateline"` // 添加时间
  21. }
  22. // OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
  23. // the data and where attributes for empty values.
  24. func (r *Entity) OmitEmpty() *arModel {
  25. return Model.Data(r).OmitEmpty()
  26. }
  27. // Inserts does "INSERT...INTO..." statement for inserting current object into table.
  28. func (r *Entity) Insert() (result sql.Result, err error) {
  29. return Model.Data(r).Insert()
  30. }
  31. // InsertIgnore does "INSERT IGNORE INTO ..." statement for inserting current object into table.
  32. func (r *Entity) InsertIgnore() (result sql.Result, err error) {
  33. return Model.Data(r).InsertIgnore()
  34. }
  35. // Replace does "REPLACE...INTO..." statement for inserting current object into table.
  36. // If there's already another same record in the table (it checks using primary key or unique index),
  37. // it deletes it and insert this one.
  38. func (r *Entity) Replace() (result sql.Result, err error) {
  39. return Model.Data(r).Replace()
  40. }
  41. // Save does "INSERT...INTO..." statement for inserting/updating current object into table.
  42. // It updates the record if there's already another same record in the table
  43. // (it checks using primary key or unique index).
  44. func (r *Entity) Save() (result sql.Result, err error) {
  45. return Model.Data(r).Save()
  46. }
  47. // Update does "UPDATE...WHERE..." statement for updating current object from table.
  48. // It updates the record if there's already another same record in the table
  49. // (it checks using primary key or unique index).
  50. func (r *Entity) Update() (result sql.Result, err error) {
  51. return Model.Data(r).Where(gdb.GetWhereConditionOfStruct(r)).Update()
  52. }
  53. // Delete does "DELETE FROM...WHERE..." statement for deleting current object from table.
  54. func (r *Entity) Delete() (result sql.Result, err error) {
  55. return Model.Where(gdb.GetWhereConditionOfStruct(r)).Delete()
  56. }