youngee_task_logistics.go 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // ==========================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // ==========================================================================
  4. package internal
  5. import (
  6. "context"
  7. "github.com/gogf/gf/database/gdb"
  8. "github.com/gogf/gf/frame/g"
  9. )
  10. // YoungeeTaskLogisticsDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YoungeeTaskLogisticsDao struct {
  12. Table string // Table is the underlying table name of the DAO.
  13. Group string // Group is the database configuration group name of current DAO.
  14. Columns YoungeeTaskLogisticsColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YoungeeTaskLogisticsColumns defines and stores column names for table youngee_task_logistics.
  17. type YoungeeTaskLogisticsColumns struct {
  18. LogisticsId string // 货物-id
  19. CompanyName string // 实物商品-物流公司名称
  20. LogisticsNumber string // 实物商品-物流单号
  21. ExplorestoreStarttime string // 线下探店-探店开始时间
  22. ExplorestoreEndtime string // 线下探店-探店结束时间
  23. ExplorestorePeriod string // 线下探店-探店持续时间
  24. CouponCodeInformation string // 虚拟产品-券码信息
  25. TaskId string // 任务id
  26. DeliveryTime string // 发货时间
  27. ThingsType string // 任务类型:1 实物,2:线下探店,3:虚拟产品
  28. SignedTime string // 实物商品-签收时间
  29. AutoSignAt string // 自动签收时间
  30. AutoScriptBreakAt string // 脚本违约自动处理时间
  31. AutoSketchBreakAt string // 初稿违约自动处理时间
  32. Status string // 签收状态,0为未签收,1为已签收
  33. }
  34. // youngeeTaskLogisticsColumns holds the columns for table youngee_task_logistics.
  35. var youngeeTaskLogisticsColumns = YoungeeTaskLogisticsColumns{
  36. LogisticsId: "logistics_id",
  37. CompanyName: "company_name",
  38. LogisticsNumber: "logistics_number",
  39. ExplorestoreStarttime: "explorestore_starttime",
  40. ExplorestoreEndtime: "explorestore_endtime",
  41. ExplorestorePeriod: "explorestore_period",
  42. CouponCodeInformation: "coupon_code_information",
  43. TaskId: "task_id",
  44. DeliveryTime: "delivery_time",
  45. ThingsType: "things_type",
  46. SignedTime: "signed_time",
  47. AutoSignAt: "auto_sign_at",
  48. AutoScriptBreakAt: "auto_script_break_at",
  49. AutoSketchBreakAt: "auto_sketch_break_at",
  50. Status: "status",
  51. }
  52. // NewYoungeeTaskLogisticsDao creates and returns a new DAO object for table data access.
  53. func NewYoungeeTaskLogisticsDao() *YoungeeTaskLogisticsDao {
  54. return &YoungeeTaskLogisticsDao{
  55. Group: "default",
  56. Table: "youngee_task_logistics",
  57. Columns: youngeeTaskLogisticsColumns,
  58. }
  59. }
  60. // DB retrieves and returns the underlying raw database management object of current DAO.
  61. func (dao *YoungeeTaskLogisticsDao) DB() gdb.DB {
  62. return g.DB(dao.Group)
  63. }
  64. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  65. func (dao *YoungeeTaskLogisticsDao) Ctx(ctx context.Context) *gdb.Model {
  66. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  67. }
  68. // Transaction wraps the transaction logic using function f.
  69. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  70. // It commits the transaction and returns nil if function f returns nil.
  71. //
  72. // Note that, you should not Commit or Rollback the transaction in function f
  73. // as it is automatically handled by this function.
  74. func (dao *YoungeeTaskLogisticsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  75. return dao.Ctx(ctx).Transaction(ctx, f)
  76. }