bank_arrange_detail_entity.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
  3. // ==========================================================================
  4. package bank_arrange_detail
  5. import (
  6. "database/sql"
  7. "github.com/gogf/gf/database/gdb"
  8. "github.com/gogf/gf/os/gtime"
  9. )
  10. // Entity is the golang structure for table bank_arrange_detail.
  11. type Entity struct {
  12. Id int `orm:"Id,primary" json:"id"` //
  13. ParentId int `orm:"ParentId" json:"parent_id"` // 库内整理主单ID
  14. BoxId int `orm:"BoxId" json:"box_id"` // 冻存盒表bank_box的Id
  15. SampleId int `orm:"SampleId" json:"sample_id"` // 样本表bank_sample的id
  16. BarCode string `orm:"BarCode" json:"bar_code"` // 唯一码,ArrangeType=1时,该字段为盒子编码,ArrangeType=2时,该字段为样本编码
  17. TaskStatus uint `orm:"TaskStatus" json:"task_status"` // 任务执行状态(与main表一致) 4. 执行失败 5. 执行成功;7 驳回
  18. EquipmentId int `orm:"EquipmentId" json:"equipment_id"` // 容器ID
  19. ShelfId int `orm:"ShelfId" json:"shelf_id"` // 冻存架Id
  20. Position string `orm:"Position" json:"position"` // 所处位置;格式(x;y)x代表第几列 Y代表第几行,positionInfo中需要将Y转为对应字母值,再拼接X;ArrangeType=1时,表示位于架子上位置,为2时表示位于盒内的位置
  21. PositionInfo string `orm:"PositionInfo" json:"position_info"` // 列表中显示的位置信息,ArrangeType=1时,表示(容器+架子+position)例如:容器1-A1-A2,ArrangeType=2时,表示(容器+层+盒+position),例如:容器1-A1-A1-A2
  22. LastBoxId int `orm:"LastBoxId" json:"last_box_id"` // 整理前盒子Id,ArrangeType=2时,该字段不为空,表示样本再整理前存放的盒子id
  23. LastShelfId int `orm:"LastShelfId" json:"last_shelf_id"` // 整理前冻存架Id
  24. LastPosition string `orm:"LastPosition" json:"last_position"` // 整理前所处位置;格式(x;y)x代表第几列 Y代表第几行,positionInfo中需要将Y转为对应字母值,再拼接X;ArrangeType=1时,表示位于架子上位置,为2时表示位于盒内的位置
  25. LastPositionInfo string `orm:"LastPositionInfo" json:"last_position_info"` // 列表中显示的整理前的位置信息,ArrangeType=1时,表示(容器+分区+position),ArrangeType=2时,表示(容器+分区+盒位置+position)
  26. IsLocked int `orm:"IsLocked" json:"is_locked"` // 是否显示锁的标志(入库,出库审批过程中显示锁)
  27. CancelId int `orm:"CancelId" json:"cancel_id"` // 撤销人Id
  28. CancelBy string `orm:"CancelBy" json:"cancel_by"` // 撤销人
  29. Remark string `orm:"Remark" json:"remark"` // 备注
  30. DetailStatus int `orm:"DetailStatus" json:"detail_status"` // 状态0:申请;2:已审核;1 提交待审核
  31. CreateOn *gtime.Time `orm:"CreateOn" json:"create_on"` //
  32. CreateUserId string `orm:"CreateUserId" json:"create_user_id"` //
  33. CreateBy string `orm:"CreateBy" json:"create_by"` //
  34. ModifiedOn *gtime.Time `orm:"ModifiedOn" json:"modified_on"` //
  35. ModifiedUserId string `orm:"ModifiedUserId" json:"modified_user_id"` //
  36. ModifiedBy string `orm:"ModifiedBy" json:"modified_by"` //
  37. ArrangeType int `orm:"ArrangeType" json:"arrange_type"` // 类型,1:盒子,2:样本
  38. Reason string `orm:"Reason" json:"reason"` // 原因明细,ID是字典明细
  39. }
  40. // OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
  41. // the data and where attributes for empty values.
  42. // Deprecated.
  43. func (r *Entity) OmitEmpty() *arModel {
  44. return Model.Data(r).OmitEmpty()
  45. }
  46. // Inserts does "INSERT...INTO..." statement for inserting current object into table.
  47. // Deprecated.
  48. func (r *Entity) Insert() (result sql.Result, err error) {
  49. return Model.Data(r).Insert()
  50. }
  51. // InsertIgnore does "INSERT IGNORE INTO ..." statement for inserting current object into table.
  52. // Deprecated.
  53. func (r *Entity) InsertIgnore() (result sql.Result, err error) {
  54. return Model.Data(r).InsertIgnore()
  55. }
  56. // Replace does "REPLACE...INTO..." statement for inserting current object into table.
  57. // If there's already another same record in the table (it checks using primary key or unique index),
  58. // it deletes it and insert this one.
  59. // Deprecated.
  60. func (r *Entity) Replace() (result sql.Result, err error) {
  61. return Model.Data(r).Replace()
  62. }
  63. // Save does "INSERT...INTO..." statement for inserting/updating current object into table.
  64. // It updates the record if there's already another same record in the table
  65. // (it checks using primary key or unique index).
  66. // Deprecated.
  67. func (r *Entity) Save() (result sql.Result, err error) {
  68. return Model.Data(r).Save()
  69. }
  70. // Update does "UPDATE...WHERE..." statement for updating current object from table.
  71. // It updates the record if there's already another same record in the table
  72. // (it checks using primary key or unique index).
  73. // Deprecated.
  74. func (r *Entity) Update() (result sql.Result, err error) {
  75. where, args, err := gdb.GetWhereConditionOfStruct(r)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return Model.Data(r).Where(where, args).Update()
  80. }
  81. // Delete does "DELETE FROM...WHERE..." statement for deleting current object from table.
  82. // Deprecated.
  83. func (r *Entity) Delete() (result sql.Result, err error) {
  84. where, args, err := gdb.GetWhereConditionOfStruct(r)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return Model.Where(where, args).Delete()
  89. }