youngee_task_logistics.go 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. }
  30. // youngeeTaskLogisticsColumns holds the columns for table youngee_task_logistics.
  31. var youngeeTaskLogisticsColumns = YoungeeTaskLogisticsColumns{
  32. LogisticsId: "logistics_id",
  33. CompanyName: "company_name",
  34. LogisticsNumber: "logistics_number",
  35. ExplorestoreStarttime: "explorestore_starttime",
  36. ExplorestoreEndtime: "explorestore_endtime",
  37. ExplorestorePeriod: "explorestore_period",
  38. CouponCodeInformation: "coupon_code_information",
  39. TaskId: "task_id",
  40. DeliveryTime: "delivery_time",
  41. ThingsType: "things_type",
  42. SignedTime: "signed_time",
  43. }
  44. // NewYoungeeTaskLogisticsDao creates and returns a new DAO object for table data access.
  45. func NewYoungeeTaskLogisticsDao() *YoungeeTaskLogisticsDao {
  46. return &YoungeeTaskLogisticsDao{
  47. Group: "default",
  48. Table: "youngee_task_logistics",
  49. Columns: youngeeTaskLogisticsColumns,
  50. }
  51. }
  52. // DB retrieves and returns the underlying raw database management object of current DAO.
  53. func (dao *YoungeeTaskLogisticsDao) DB() gdb.DB {
  54. return g.DB(dao.Group)
  55. }
  56. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  57. func (dao *YoungeeTaskLogisticsDao) Ctx(ctx context.Context) *gdb.Model {
  58. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  59. }
  60. // Transaction wraps the transaction logic using function f.
  61. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  62. // It commits the transaction and returns nil if function f returns nil.
  63. //
  64. // Note that, you should not Commit or Rollback the transaction in function f
  65. // as it is automatically handled by this function.
  66. func (dao *YoungeeTaskLogisticsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  67. return dao.Ctx(ctx).Transaction(ctx, f)
  68. }