feat: 新增养成管理后台
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// adminOperationLogDao is the data access object for the table cv_admin_operation_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminOperationLogDao struct {
|
||||
*internal.AdminOperationLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminOperationLog is a globally accessible object for table cv_admin_operation_log operations.
|
||||
AdminOperationLog = adminOperationLogDao{internal.NewAdminOperationLogDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// contentAuditLogDao is the data access object for the table cv_content_audit_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type contentAuditLogDao struct {
|
||||
*internal.ContentAuditLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// ContentAuditLog is a globally accessible object for table cv_content_audit_log operations.
|
||||
ContentAuditLog = contentAuditLogDao{internal.NewContentAuditLogDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// feedCommentDao is the data access object for the table cv_feed_comment.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type feedCommentDao struct {
|
||||
*internal.FeedCommentDao
|
||||
}
|
||||
|
||||
var (
|
||||
// FeedComment is a globally accessible object for table cv_feed_comment operations.
|
||||
FeedComment = feedCommentDao{internal.NewFeedCommentDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// feedMediaDao is the data access object for the table cv_feed_media.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type feedMediaDao struct {
|
||||
*internal.FeedMediaDao
|
||||
}
|
||||
|
||||
var (
|
||||
// FeedMedia is a globally accessible object for table cv_feed_media operations.
|
||||
FeedMedia = feedMediaDao{internal.NewFeedMediaDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// feedPostDao is the data access object for the table cv_feed_post.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type feedPostDao struct {
|
||||
*internal.FeedPostDao
|
||||
}
|
||||
|
||||
var (
|
||||
// FeedPost is a globally accessible object for table cv_feed_post operations.
|
||||
FeedPost = feedPostDao{internal.NewFeedPostDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// feedReportDao is the data access object for the table cv_feed_report.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type feedReportDao struct {
|
||||
*internal.FeedReportDao
|
||||
}
|
||||
|
||||
var (
|
||||
// FeedReport is a globally accessible object for table cv_feed_report operations.
|
||||
FeedReport = feedReportDao{internal.NewFeedReportDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// flowerCatalogDao is the data access object for the table cv_flower_catalog.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type flowerCatalogDao struct {
|
||||
*internal.FlowerCatalogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// FlowerCatalog is a globally accessible object for table cv_flower_catalog operations.
|
||||
FlowerCatalog = flowerCatalogDao{internal.NewFlowerCatalogDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"hotgo/internal/dao/internal"
|
||||
)
|
||||
|
||||
// flowerStageRuleDao is the data access object for the table cv_flower_stage_rule.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type flowerStageRuleDao struct {
|
||||
*internal.FlowerStageRuleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// FlowerStageRule is a globally accessible object for table cv_flower_stage_rule operations.
|
||||
FlowerStageRule = flowerStageRuleDao{internal.NewFlowerStageRuleDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
@@ -0,0 +1,103 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminOperationLogDao is the data access object for the table cv_admin_operation_log.
|
||||
type AdminOperationLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns AdminOperationLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminOperationLogColumns defines and stores column names for the table cv_admin_operation_log.
|
||||
type AdminOperationLogColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
OperatorId string //
|
||||
OperationType string //
|
||||
TargetType string //
|
||||
TargetId string //
|
||||
RequestId string //
|
||||
BeforeSnapshot string //
|
||||
AfterSnapshot string //
|
||||
Reason string //
|
||||
IpAddress string //
|
||||
UserAgent string //
|
||||
CreatedAt string //
|
||||
}
|
||||
|
||||
// adminOperationLogColumns holds the columns for the table cv_admin_operation_log.
|
||||
var adminOperationLogColumns = AdminOperationLogColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
OperatorId: "operator_id",
|
||||
OperationType: "operation_type",
|
||||
TargetType: "target_type",
|
||||
TargetId: "target_id",
|
||||
RequestId: "request_id",
|
||||
BeforeSnapshot: "before_snapshot",
|
||||
AfterSnapshot: "after_snapshot",
|
||||
Reason: "reason",
|
||||
IpAddress: "ip_address",
|
||||
UserAgent: "user_agent",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewAdminOperationLogDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminOperationLogDao(handlers ...gdb.ModelHandler) *AdminOperationLogDao {
|
||||
return &AdminOperationLogDao{
|
||||
group: "cultivate",
|
||||
table: "cv_admin_operation_log",
|
||||
columns: adminOperationLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminOperationLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminOperationLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminOperationLogDao) Columns() AdminOperationLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminOperationLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *AdminOperationLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *AdminOperationLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// ContentAuditLogDao is the data access object for the table cv_content_audit_log.
|
||||
type ContentAuditLogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns ContentAuditLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// ContentAuditLogColumns defines and stores column names for the table cv_content_audit_log.
|
||||
type ContentAuditLogColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
ObjectType string //
|
||||
ObjectId string //
|
||||
AuditRequestId string //
|
||||
AuditSource string //
|
||||
StatusBefore string //
|
||||
StatusAfter string //
|
||||
ResultCode string //
|
||||
RiskLabels string //
|
||||
OperatorId string //
|
||||
OccurredAt string //
|
||||
CreatedAt string //
|
||||
}
|
||||
|
||||
// contentAuditLogColumns holds the columns for the table cv_content_audit_log.
|
||||
var contentAuditLogColumns = ContentAuditLogColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ObjectType: "object_type",
|
||||
ObjectId: "object_id",
|
||||
AuditRequestId: "audit_request_id",
|
||||
AuditSource: "audit_source",
|
||||
StatusBefore: "status_before",
|
||||
StatusAfter: "status_after",
|
||||
ResultCode: "result_code",
|
||||
RiskLabels: "risk_labels",
|
||||
OperatorId: "operator_id",
|
||||
OccurredAt: "occurred_at",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewContentAuditLogDao creates and returns a new DAO object for table data access.
|
||||
func NewContentAuditLogDao(handlers ...gdb.ModelHandler) *ContentAuditLogDao {
|
||||
return &ContentAuditLogDao{
|
||||
group: "cultivate",
|
||||
table: "cv_content_audit_log",
|
||||
columns: contentAuditLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *ContentAuditLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *ContentAuditLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *ContentAuditLogDao) Columns() ContentAuditLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *ContentAuditLogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *ContentAuditLogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *ContentAuditLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// FeedCommentDao is the data access object for the table cv_feed_comment.
|
||||
type FeedCommentDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns FeedCommentColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// FeedCommentColumns defines and stores column names for the table cv_feed_comment.
|
||||
type FeedCommentColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
PostId string //
|
||||
AuthorId string //
|
||||
ContentText string //
|
||||
Status string //
|
||||
AuditStatus string //
|
||||
AuditRequestId string //
|
||||
DeletedBy string //
|
||||
DeleteReason string //
|
||||
PublishedAt string //
|
||||
DeletedAt string //
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
}
|
||||
|
||||
// feedCommentColumns holds the columns for the table cv_feed_comment.
|
||||
var feedCommentColumns = FeedCommentColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
PostId: "post_id",
|
||||
AuthorId: "author_id",
|
||||
ContentText: "content_text",
|
||||
Status: "status",
|
||||
AuditStatus: "audit_status",
|
||||
AuditRequestId: "audit_request_id",
|
||||
DeletedBy: "deleted_by",
|
||||
DeleteReason: "delete_reason",
|
||||
PublishedAt: "published_at",
|
||||
DeletedAt: "deleted_at",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewFeedCommentDao creates and returns a new DAO object for table data access.
|
||||
func NewFeedCommentDao(handlers ...gdb.ModelHandler) *FeedCommentDao {
|
||||
return &FeedCommentDao{
|
||||
group: "cultivate",
|
||||
table: "cv_feed_comment",
|
||||
columns: feedCommentColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *FeedCommentDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *FeedCommentDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *FeedCommentDao) Columns() FeedCommentColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *FeedCommentDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *FeedCommentDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *FeedCommentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// FeedMediaDao is the data access object for the table cv_feed_media.
|
||||
type FeedMediaDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns FeedMediaColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// FeedMediaColumns defines and stores column names for the table cv_feed_media.
|
||||
type FeedMediaColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
PostId string //
|
||||
UserId string //
|
||||
MediaType string //
|
||||
FileId string //
|
||||
ThumbnailFileId string //
|
||||
Width string //
|
||||
Height string //
|
||||
SortNo string //
|
||||
AuditStatus string //
|
||||
AuditRequestId string //
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
}
|
||||
|
||||
// feedMediaColumns holds the columns for the table cv_feed_media.
|
||||
var feedMediaColumns = FeedMediaColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
PostId: "post_id",
|
||||
UserId: "user_id",
|
||||
MediaType: "media_type",
|
||||
FileId: "file_id",
|
||||
ThumbnailFileId: "thumbnail_file_id",
|
||||
Width: "width",
|
||||
Height: "height",
|
||||
SortNo: "sort_no",
|
||||
AuditStatus: "audit_status",
|
||||
AuditRequestId: "audit_request_id",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewFeedMediaDao creates and returns a new DAO object for table data access.
|
||||
func NewFeedMediaDao(handlers ...gdb.ModelHandler) *FeedMediaDao {
|
||||
return &FeedMediaDao{
|
||||
group: "cultivate",
|
||||
table: "cv_feed_media",
|
||||
columns: feedMediaColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *FeedMediaDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *FeedMediaDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *FeedMediaDao) Columns() FeedMediaColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *FeedMediaDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *FeedMediaDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *FeedMediaDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// FeedPostDao is the data access object for the table cv_feed_post.
|
||||
type FeedPostDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns FeedPostColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// FeedPostColumns defines and stores column names for the table cv_feed_post.
|
||||
type FeedPostColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
AuthorId string //
|
||||
ContentText string //
|
||||
FlowerCode string //
|
||||
SourceType string //
|
||||
SourceId string //
|
||||
Visibility string //
|
||||
Status string //
|
||||
AuditStatus string //
|
||||
AuditRequestId string //
|
||||
RejectReasonCode string //
|
||||
LikeCount string //
|
||||
CommentCount string //
|
||||
Version string //
|
||||
PublishedAt string //
|
||||
DeletedAt string //
|
||||
TakenDownAt string //
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
}
|
||||
|
||||
// feedPostColumns holds the columns for the table cv_feed_post.
|
||||
var feedPostColumns = FeedPostColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
AuthorId: "author_id",
|
||||
ContentText: "content_text",
|
||||
FlowerCode: "flower_code",
|
||||
SourceType: "source_type",
|
||||
SourceId: "source_id",
|
||||
Visibility: "visibility",
|
||||
Status: "status",
|
||||
AuditStatus: "audit_status",
|
||||
AuditRequestId: "audit_request_id",
|
||||
RejectReasonCode: "reject_reason_code",
|
||||
LikeCount: "like_count",
|
||||
CommentCount: "comment_count",
|
||||
Version: "version",
|
||||
PublishedAt: "published_at",
|
||||
DeletedAt: "deleted_at",
|
||||
TakenDownAt: "taken_down_at",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewFeedPostDao creates and returns a new DAO object for table data access.
|
||||
func NewFeedPostDao(handlers ...gdb.ModelHandler) *FeedPostDao {
|
||||
return &FeedPostDao{
|
||||
group: "cultivate",
|
||||
table: "cv_feed_post",
|
||||
columns: feedPostColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *FeedPostDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *FeedPostDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *FeedPostDao) Columns() FeedPostColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *FeedPostDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *FeedPostDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *FeedPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// FeedReportDao is the data access object for the table cv_feed_report.
|
||||
type FeedReportDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns FeedReportColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// FeedReportColumns defines and stores column names for the table cv_feed_report.
|
||||
type FeedReportColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
ReporterId string //
|
||||
ReportedUserId string //
|
||||
ObjectType string //
|
||||
ObjectId string //
|
||||
ReasonCode string //
|
||||
Description string //
|
||||
EvidenceFileIds string //
|
||||
SourcePage string //
|
||||
Status string //
|
||||
HandlerId string //
|
||||
HandleResult string //
|
||||
HandledAt string //
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
}
|
||||
|
||||
// feedReportColumns holds the columns for the table cv_feed_report.
|
||||
var feedReportColumns = FeedReportColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ReporterId: "reporter_id",
|
||||
ReportedUserId: "reported_user_id",
|
||||
ObjectType: "object_type",
|
||||
ObjectId: "object_id",
|
||||
ReasonCode: "reason_code",
|
||||
Description: "description",
|
||||
EvidenceFileIds: "evidence_file_ids",
|
||||
SourcePage: "source_page",
|
||||
Status: "status",
|
||||
HandlerId: "handler_id",
|
||||
HandleResult: "handle_result",
|
||||
HandledAt: "handled_at",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewFeedReportDao creates and returns a new DAO object for table data access.
|
||||
func NewFeedReportDao(handlers ...gdb.ModelHandler) *FeedReportDao {
|
||||
return &FeedReportDao{
|
||||
group: "cultivate",
|
||||
table: "cv_feed_report",
|
||||
columns: feedReportColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *FeedReportDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *FeedReportDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *FeedReportDao) Columns() FeedReportColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *FeedReportDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *FeedReportDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *FeedReportDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// FlowerCatalogDao is the data access object for the table cv_flower_catalog.
|
||||
type FlowerCatalogDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns FlowerCatalogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// FlowerCatalogColumns defines and stores column names for the table cv_flower_catalog.
|
||||
type FlowerCatalogColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
FlowerCode string //
|
||||
FlowerName string //
|
||||
FlowerDesc string //
|
||||
IconFileId string //
|
||||
Status string //
|
||||
ConfigVersion string //
|
||||
DailyWaterLimit string //
|
||||
DailyFertilizeLimit string //
|
||||
ShareConfig string //
|
||||
SortNo string //
|
||||
OnlineAt string //
|
||||
OfflineAt string //
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
}
|
||||
|
||||
// flowerCatalogColumns holds the columns for the table cv_flower_catalog.
|
||||
var flowerCatalogColumns = FlowerCatalogColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
FlowerCode: "flower_code",
|
||||
FlowerName: "flower_name",
|
||||
FlowerDesc: "flower_desc",
|
||||
IconFileId: "icon_file_id",
|
||||
Status: "status",
|
||||
ConfigVersion: "config_version",
|
||||
DailyWaterLimit: "daily_water_limit",
|
||||
DailyFertilizeLimit: "daily_fertilize_limit",
|
||||
ShareConfig: "share_config",
|
||||
SortNo: "sort_no",
|
||||
OnlineAt: "online_at",
|
||||
OfflineAt: "offline_at",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewFlowerCatalogDao creates and returns a new DAO object for table data access.
|
||||
func NewFlowerCatalogDao(handlers ...gdb.ModelHandler) *FlowerCatalogDao {
|
||||
return &FlowerCatalogDao{
|
||||
group: "cultivate",
|
||||
table: "cv_flower_catalog",
|
||||
columns: flowerCatalogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *FlowerCatalogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *FlowerCatalogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *FlowerCatalogDao) Columns() FlowerCatalogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *FlowerCatalogDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *FlowerCatalogDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *FlowerCatalogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// ==========================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// FlowerStageRuleDao is the data access object for the table cv_flower_stage_rule.
|
||||
type FlowerStageRuleDao struct {
|
||||
table string // table is the underlying table name of the DAO.
|
||||
group string // group is the database configuration group name of the current DAO.
|
||||
columns FlowerStageRuleColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// FlowerStageRuleColumns defines and stores column names for the table cv_flower_stage_rule.
|
||||
type FlowerStageRuleColumns struct {
|
||||
Id string //
|
||||
TenantId string //
|
||||
FlowerCatalogId string //
|
||||
Stage string //
|
||||
NextStage string //
|
||||
RequiredPoints string //
|
||||
WaterPoints string //
|
||||
FertilizePoints string //
|
||||
AllowedActions string //
|
||||
ImageFileId string //
|
||||
AnimationFileId string //
|
||||
ProgressTextTemplate string //
|
||||
CompletionText string //
|
||||
SortNo string //
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
}
|
||||
|
||||
// flowerStageRuleColumns holds the columns for the table cv_flower_stage_rule.
|
||||
var flowerStageRuleColumns = FlowerStageRuleColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
FlowerCatalogId: "flower_catalog_id",
|
||||
Stage: "stage",
|
||||
NextStage: "next_stage",
|
||||
RequiredPoints: "required_points",
|
||||
WaterPoints: "water_points",
|
||||
FertilizePoints: "fertilize_points",
|
||||
AllowedActions: "allowed_actions",
|
||||
ImageFileId: "image_file_id",
|
||||
AnimationFileId: "animation_file_id",
|
||||
ProgressTextTemplate: "progress_text_template",
|
||||
CompletionText: "completion_text",
|
||||
SortNo: "sort_no",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewFlowerStageRuleDao creates and returns a new DAO object for table data access.
|
||||
func NewFlowerStageRuleDao(handlers ...gdb.ModelHandler) *FlowerStageRuleDao {
|
||||
return &FlowerStageRuleDao{
|
||||
group: "cultivate",
|
||||
table: "cv_flower_stage_rule",
|
||||
columns: flowerStageRuleColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *FlowerStageRuleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *FlowerStageRuleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *FlowerStageRuleDao) Columns() FlowerStageRuleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *FlowerStageRuleDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
||||
func (dao *FlowerStageRuleDao) Ctx(ctx context.Context) *gdb.Model {
|
||||
model := dao.DB().Model(dao.table)
|
||||
for _, handler := range dao.handlers {
|
||||
model = handler(model)
|
||||
}
|
||||
return model.Safe().Ctx(ctx)
|
||||
}
|
||||
|
||||
// Transaction wraps the transaction logic using function f.
|
||||
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
||||
// It commits the transaction and returns nil if function f returns nil.
|
||||
//
|
||||
// Note: Do not commit or roll back the transaction in function f,
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *FlowerStageRuleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Reference in New Issue
Block a user