feat: add Go backend
This commit is contained in:
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// addonHgexampleTableDao is the data access object for the table hg_addon_hgexample_table.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type addonHgexampleTableDao struct {
|
||||
*internal.AddonHgexampleTableDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AddonHgexampleTable is a globally accessible object for table hg_addon_hgexample_table operations.
|
||||
AddonHgexampleTable = addonHgexampleTableDao{internal.NewAddonHgexampleTableDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
+22
@@ -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"
|
||||
)
|
||||
|
||||
// addonHgexampleTenantOrderDao is the data access object for the table hg_addon_hgexample_tenant_order.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type addonHgexampleTenantOrderDao struct {
|
||||
*internal.AddonHgexampleTenantOrderDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AddonHgexampleTenantOrder is a globally accessible object for table hg_addon_hgexample_tenant_order operations.
|
||||
AddonHgexampleTenantOrder = addonHgexampleTenantOrderDao{internal.NewAddonHgexampleTenantOrderDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminCashDao is the data access object for the table hg_admin_cash.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminCashDao struct {
|
||||
*internal.AdminCashDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminCash is a globally accessible object for table hg_admin_cash operations.
|
||||
AdminCash = adminCashDao{internal.NewAdminCashDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminCreditsLogDao is the data access object for the table hg_admin_credits_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminCreditsLogDao struct {
|
||||
*internal.AdminCreditsLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminCreditsLog is a globally accessible object for table hg_admin_credits_log operations.
|
||||
AdminCreditsLog = adminCreditsLogDao{internal.NewAdminCreditsLogDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminDeptDao is the data access object for the table hg_admin_dept.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminDeptDao struct {
|
||||
*internal.AdminDeptDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminDept is a globally accessible object for table hg_admin_dept operations.
|
||||
AdminDept = adminDeptDao{internal.NewAdminDeptDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminMemberDao is the data access object for the table hg_admin_member.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMemberDao struct {
|
||||
*internal.AdminMemberDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMember is a globally accessible object for table hg_admin_member operations.
|
||||
AdminMember = adminMemberDao{internal.NewAdminMemberDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminMemberPostDao is the data access object for the table hg_admin_member_post.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMemberPostDao struct {
|
||||
*internal.AdminMemberPostDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMemberPost is a globally accessible object for table hg_admin_member_post operations.
|
||||
AdminMemberPost = adminMemberPostDao{internal.NewAdminMemberPostDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminMemberRoleDao is the data access object for the table hg_admin_member_role.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMemberRoleDao struct {
|
||||
*internal.AdminMemberRoleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMemberRole is a globally accessible object for table hg_admin_member_role operations.
|
||||
AdminMemberRole = adminMemberRoleDao{internal.NewAdminMemberRoleDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminMenuDao is the data access object for the table hg_admin_menu.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminMenuDao struct {
|
||||
*internal.AdminMenuDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminMenu is a globally accessible object for table hg_admin_menu operations.
|
||||
AdminMenu = adminMenuDao{internal.NewAdminMenuDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminNoticeDao is the data access object for the table hg_admin_notice.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminNoticeDao struct {
|
||||
*internal.AdminNoticeDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminNotice is a globally accessible object for table hg_admin_notice operations.
|
||||
AdminNotice = adminNoticeDao{internal.NewAdminNoticeDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminNoticeReadDao is the data access object for the table hg_admin_notice_read.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminNoticeReadDao struct {
|
||||
*internal.AdminNoticeReadDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminNoticeRead is a globally accessible object for table hg_admin_notice_read operations.
|
||||
AdminNoticeRead = adminNoticeReadDao{internal.NewAdminNoticeReadDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminOauthDao is the data access object for the table hg_admin_oauth.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminOauthDao struct {
|
||||
*internal.AdminOauthDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminOauth is a globally accessible object for table hg_admin_oauth operations.
|
||||
AdminOauth = adminOauthDao{internal.NewAdminOauthDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminOrderDao is the data access object for the table hg_admin_order.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminOrderDao struct {
|
||||
*internal.AdminOrderDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminOrder is a globally accessible object for table hg_admin_order operations.
|
||||
AdminOrder = adminOrderDao{internal.NewAdminOrderDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminPostDao is the data access object for the table hg_admin_post.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminPostDao struct {
|
||||
*internal.AdminPostDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminPost is a globally accessible object for table hg_admin_post operations.
|
||||
AdminPost = adminPostDao{internal.NewAdminPostDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminRoleDao is the data access object for the table hg_admin_role.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminRoleDao struct {
|
||||
*internal.AdminRoleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminRole is a globally accessible object for table hg_admin_role operations.
|
||||
AdminRole = adminRoleDao{internal.NewAdminRoleDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminRoleCasbinDao is the data access object for the table hg_admin_role_casbin.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminRoleCasbinDao struct {
|
||||
*internal.AdminRoleCasbinDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminRoleCasbin is a globally accessible object for table hg_admin_role_casbin operations.
|
||||
AdminRoleCasbin = adminRoleCasbinDao{internal.NewAdminRoleCasbinDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
Executable
+22
@@ -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"
|
||||
)
|
||||
|
||||
// adminRoleMenuDao is the data access object for the table hg_admin_role_menu.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type adminRoleMenuDao struct {
|
||||
*internal.AdminRoleMenuDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AdminRoleMenu is a globally accessible object for table hg_admin_role_menu operations.
|
||||
AdminRoleMenu = adminRoleMenuDao{internal.NewAdminRoleMenuDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberDao is the data access object for the table hg_app_member.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberDao struct {
|
||||
*internal.AppMemberDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMember is a globally accessible object for table hg_app_member operations.
|
||||
AppMember = appMemberDao{internal.NewAppMemberDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberAddressDao is the data access object for the table hg_app_member_address.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberAddressDao struct {
|
||||
*internal.AppMemberAddressDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMemberAddress is a globally accessible object for table hg_app_member_address operations.
|
||||
AppMemberAddress = appMemberAddressDao{internal.NewAppMemberAddressDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberLevelDao is the data access object for the table hg_app_member_level.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberLevelDao struct {
|
||||
*internal.AppMemberLevelDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMemberLevel is a globally accessible object for table hg_app_member_level operations.
|
||||
AppMemberLevel = appMemberLevelDao{internal.NewAppMemberLevelDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberLevelVersionDao is the data access object for the table hg_app_member_level_version.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberLevelVersionDao struct {
|
||||
*internal.AppMemberLevelVersionDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMemberLevelVersion is a globally accessible object for table hg_app_member_level_version operations.
|
||||
AppMemberLevelVersion = appMemberLevelVersionDao{internal.NewAppMemberLevelVersionDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberNoticeDao is the data access object for the table hg_app_member_notice.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberNoticeDao struct {
|
||||
*internal.AppMemberNoticeDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMemberNotice is a globally accessible object for table hg_app_member_notice operations.
|
||||
AppMemberNotice = appMemberNoticeDao{internal.NewAppMemberNoticeDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberPaymentAccountDao is the data access object for the table hg_app_member_payment_account.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberPaymentAccountDao struct {
|
||||
*internal.AppMemberPaymentAccountDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMemberPaymentAccount is a globally accessible object for table hg_app_member_payment_account operations.
|
||||
AppMemberPaymentAccount = appMemberPaymentAccountDao{internal.NewAppMemberPaymentAccountDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberProfileDao is the data access object for the table hg_app_member_profile.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberProfileDao struct {
|
||||
*internal.AppMemberProfileDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMemberProfile is a globally accessible object for table hg_app_member_profile operations.
|
||||
AppMemberProfile = appMemberProfileDao{internal.NewAppMemberProfileDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// appMemberStatusLogDao is the data access object for the table hg_app_member_status_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type appMemberStatusLogDao struct {
|
||||
*internal.AppMemberStatusLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// AppMemberStatusLog is a globally accessible object for table hg_app_member_status_log operations.
|
||||
AppMemberStatusLog = appMemberStatusLogDao{internal.NewAppMemberStatusLogDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// approvalActionDao is the data access object for the table hg_approval_action.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type approvalActionDao struct {
|
||||
*internal.ApprovalActionDao
|
||||
}
|
||||
|
||||
var (
|
||||
// ApprovalAction is a globally accessible object for table hg_approval_action operations.
|
||||
ApprovalAction = approvalActionDao{internal.NewApprovalActionDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// approvalRequestDao is the data access object for the table hg_approval_request.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type approvalRequestDao struct {
|
||||
*internal.ApprovalRequestDao
|
||||
}
|
||||
|
||||
var (
|
||||
// ApprovalRequest is a globally accessible object for table hg_approval_request operations.
|
||||
ApprovalRequest = approvalRequestDao{internal.NewApprovalRequestDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// bannerDao is the data access object for the table hg_banner.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type bannerDao struct {
|
||||
*internal.BannerDao
|
||||
}
|
||||
|
||||
var (
|
||||
// Banner is a globally accessible object for table hg_banner operations.
|
||||
Banner = bannerDao{internal.NewBannerDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// bizAuditLogDao is the data access object for the table hg_biz_audit_log.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type bizAuditLogDao struct {
|
||||
*internal.BizAuditLogDao
|
||||
}
|
||||
|
||||
var (
|
||||
// BizAuditLog is a globally accessible object for table hg_biz_audit_log operations.
|
||||
BizAuditLog = bizAuditLogDao{internal.NewBizAuditLogDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// contentDao is the data access object for the table hg_content.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type contentDao struct {
|
||||
*internal.ContentDao
|
||||
}
|
||||
|
||||
var (
|
||||
// Content is a globally accessible object for table hg_content operations.
|
||||
Content = contentDao{internal.NewContentDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// contentVersionDao is the data access object for the table hg_content_version.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type contentVersionDao struct {
|
||||
*internal.ContentVersionDao
|
||||
}
|
||||
|
||||
var (
|
||||
// ContentVersion is a globally accessible object for table hg_content_version operations.
|
||||
ContentVersion = contentVersionDao{internal.NewContentVersionDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// customerServiceDao is the data access object for the table hg_customer_service.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type customerServiceDao struct {
|
||||
*internal.CustomerServiceDao
|
||||
}
|
||||
|
||||
var (
|
||||
// CustomerService is a globally accessible object for table hg_customer_service operations.
|
||||
CustomerService = customerServiceDao{internal.NewCustomerServiceDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// dashboardDailyStatDao is the data access object for the table hg_dashboard_daily_stat.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type dashboardDailyStatDao struct {
|
||||
*internal.DashboardDailyStatDao
|
||||
}
|
||||
|
||||
var (
|
||||
// DashboardDailyStat is a globally accessible object for table hg_dashboard_daily_stat operations.
|
||||
DashboardDailyStat = dashboardDailyStatDao{internal.NewDashboardDailyStatDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// financeReviewDao is the data access object for the table hg_finance_review.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type financeReviewDao struct {
|
||||
*internal.FinanceReviewDao
|
||||
}
|
||||
|
||||
var (
|
||||
// FinanceReview is a globally accessible object for table hg_finance_review operations.
|
||||
FinanceReview = financeReviewDao{internal.NewFinanceReviewDao()}
|
||||
)
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// idempotencyRecordDao is the data access object for the table hg_idempotency_record.
|
||||
// You can define custom methods on it to extend its functionality as needed.
|
||||
type idempotencyRecordDao struct {
|
||||
*internal.IdempotencyRecordDao
|
||||
}
|
||||
|
||||
var (
|
||||
// IdempotencyRecord is a globally accessible object for table hg_idempotency_record operations.
|
||||
IdempotencyRecord = idempotencyRecordDao{internal.NewIdempotencyRecordDao()}
|
||||
)
|
||||
|
||||
// Add your custom methods and functionality below.
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AddonHgexampleTableDao is the data access object for the table hg_addon_hgexample_table.
|
||||
type AddonHgexampleTableDao 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 AddonHgexampleTableColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AddonHgexampleTableColumns defines and stores column names for the table hg_addon_hgexample_table.
|
||||
type AddonHgexampleTableColumns struct {
|
||||
Id string // ID
|
||||
Pid string // 上级ID
|
||||
Level string // 树等级
|
||||
Tree string // 关系树
|
||||
CategoryId string // 分类ID
|
||||
Flag string // 标签
|
||||
Title string // 标题
|
||||
Description string // 描述
|
||||
Content string // 内容
|
||||
Image string // 单图
|
||||
Images string // 多图
|
||||
Attachfile string // 附件
|
||||
Attachfiles string // 多附件
|
||||
Map string // 动态键值对
|
||||
Star string // 推荐星
|
||||
Price string // 价格
|
||||
Views string // 浏览次数
|
||||
ActivityAt string // 活动时间
|
||||
StartAt string // 开启时间
|
||||
EndAt string // 结束时间
|
||||
Switch string // 开关
|
||||
Sort string // 排序
|
||||
Avatar string // 头像
|
||||
Sex string // 性别
|
||||
Qq string // qq
|
||||
Email string // 邮箱
|
||||
Mobile string // 手机号码
|
||||
Hobby string // 爱好
|
||||
Channel string // 渠道
|
||||
CityId string // 所在城市
|
||||
Remark string // 备注
|
||||
Status string // 状态
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// addonHgexampleTableColumns holds the columns for the table hg_addon_hgexample_table.
|
||||
var addonHgexampleTableColumns = AddonHgexampleTableColumns{
|
||||
Id: "id",
|
||||
Pid: "pid",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
CategoryId: "category_id",
|
||||
Flag: "flag",
|
||||
Title: "title",
|
||||
Description: "description",
|
||||
Content: "content",
|
||||
Image: "image",
|
||||
Images: "images",
|
||||
Attachfile: "attachfile",
|
||||
Attachfiles: "attachfiles",
|
||||
Map: "map",
|
||||
Star: "star",
|
||||
Price: "price",
|
||||
Views: "views",
|
||||
ActivityAt: "activity_at",
|
||||
StartAt: "start_at",
|
||||
EndAt: "end_at",
|
||||
Switch: "switch",
|
||||
Sort: "sort",
|
||||
Avatar: "avatar",
|
||||
Sex: "sex",
|
||||
Qq: "qq",
|
||||
Email: "email",
|
||||
Mobile: "mobile",
|
||||
Hobby: "hobby",
|
||||
Channel: "channel",
|
||||
CityId: "city_id",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewAddonHgexampleTableDao creates and returns a new DAO object for table data access.
|
||||
func NewAddonHgexampleTableDao(handlers ...gdb.ModelHandler) *AddonHgexampleTableDao {
|
||||
return &AddonHgexampleTableDao{
|
||||
group: "default",
|
||||
table: "hg_addon_hgexample_table",
|
||||
columns: addonHgexampleTableColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AddonHgexampleTableDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AddonHgexampleTableDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AddonHgexampleTableDao) Columns() AddonHgexampleTableColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AddonHgexampleTableDao) 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 *AddonHgexampleTableDao) 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 *AddonHgexampleTableDao) 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,99 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AddonHgexampleTenantOrderDao is the data access object for the table hg_addon_hgexample_tenant_order.
|
||||
type AddonHgexampleTenantOrderDao 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 AddonHgexampleTenantOrderColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AddonHgexampleTenantOrderColumns defines and stores column names for the table hg_addon_hgexample_tenant_order.
|
||||
type AddonHgexampleTenantOrderColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
MerchantId string // 商户ID
|
||||
UserId string // 用户ID
|
||||
ProductName string // 购买产品
|
||||
OrderSn string // 订单号
|
||||
Money string // 充值金额
|
||||
Remark string // 备注
|
||||
Status string // 订单状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// addonHgexampleTenantOrderColumns holds the columns for the table hg_addon_hgexample_tenant_order.
|
||||
var addonHgexampleTenantOrderColumns = AddonHgexampleTenantOrderColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
MerchantId: "merchant_id",
|
||||
UserId: "user_id",
|
||||
ProductName: "product_name",
|
||||
OrderSn: "order_sn",
|
||||
Money: "money",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAddonHgexampleTenantOrderDao creates and returns a new DAO object for table data access.
|
||||
func NewAddonHgexampleTenantOrderDao(handlers ...gdb.ModelHandler) *AddonHgexampleTenantOrderDao {
|
||||
return &AddonHgexampleTenantOrderDao{
|
||||
group: "default",
|
||||
table: "hg_addon_hgexample_tenant_order",
|
||||
columns: addonHgexampleTenantOrderColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AddonHgexampleTenantOrderDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AddonHgexampleTenantOrderDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AddonHgexampleTenantOrderDao) Columns() AddonHgexampleTenantOrderColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AddonHgexampleTenantOrderDao) 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 *AddonHgexampleTenantOrderDao) 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 *AddonHgexampleTenantOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+97
@@ -0,0 +1,97 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminCashDao is the data access object for the table hg_admin_cash.
|
||||
type AdminCashDao 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 AdminCashColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminCashColumns defines and stores column names for the table hg_admin_cash.
|
||||
type AdminCashColumns struct {
|
||||
Id string // ID
|
||||
MemberId string // 管理员ID
|
||||
Money string // 提现金额
|
||||
Fee string // 手续费
|
||||
LastMoney string // 最终到账金额
|
||||
Ip string // 申请人IP
|
||||
Status string // 状态码
|
||||
Msg string // 处理结果
|
||||
HandleAt string // 处理时间
|
||||
CreatedAt string // 申请时间
|
||||
}
|
||||
|
||||
// adminCashColumns holds the columns for the table hg_admin_cash.
|
||||
var adminCashColumns = AdminCashColumns{
|
||||
Id: "id",
|
||||
MemberId: "member_id",
|
||||
Money: "money",
|
||||
Fee: "fee",
|
||||
LastMoney: "last_money",
|
||||
Ip: "ip",
|
||||
Status: "status",
|
||||
Msg: "msg",
|
||||
HandleAt: "handle_at",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewAdminCashDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminCashDao(handlers ...gdb.ModelHandler) *AdminCashDao {
|
||||
return &AdminCashDao{
|
||||
group: "default",
|
||||
table: "hg_admin_cash",
|
||||
columns: adminCashColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminCashDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminCashDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminCashDao) Columns() AdminCashColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminCashDao) 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 *AdminCashDao) 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 *AdminCashDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminCreditsLogDao is the data access object for the table hg_admin_credits_log.
|
||||
type AdminCreditsLogDao 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 AdminCreditsLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminCreditsLogColumns defines and stores column names for the table hg_admin_credits_log.
|
||||
type AdminCreditsLogColumns struct {
|
||||
Id string // 变动ID
|
||||
MemberId string // 管理员ID
|
||||
AppId string // 应用id
|
||||
AddonsName string // 插件名称
|
||||
CreditType string // 变动类型
|
||||
CreditGroup string // 变动组别
|
||||
BeforeNum string // 变动前
|
||||
Num string // 变动数据
|
||||
AfterNum string // 变动后
|
||||
Remark string // 备注
|
||||
Ip string // 操作人IP
|
||||
MapId string // 关联ID
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// adminCreditsLogColumns holds the columns for the table hg_admin_credits_log.
|
||||
var adminCreditsLogColumns = AdminCreditsLogColumns{
|
||||
Id: "id",
|
||||
MemberId: "member_id",
|
||||
AppId: "app_id",
|
||||
AddonsName: "addons_name",
|
||||
CreditType: "credit_type",
|
||||
CreditGroup: "credit_group",
|
||||
BeforeNum: "before_num",
|
||||
Num: "num",
|
||||
AfterNum: "after_num",
|
||||
Remark: "remark",
|
||||
Ip: "ip",
|
||||
MapId: "map_id",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAdminCreditsLogDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminCreditsLogDao(handlers ...gdb.ModelHandler) *AdminCreditsLogDao {
|
||||
return &AdminCreditsLogDao{
|
||||
group: "default",
|
||||
table: "hg_admin_credits_log",
|
||||
columns: adminCreditsLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminCreditsLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminCreditsLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminCreditsLogDao) Columns() AdminCreditsLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminCreditsLogDao) 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 *AdminCreditsLogDao) 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 *AdminCreditsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+105
@@ -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"
|
||||
)
|
||||
|
||||
// AdminDeptDao is the data access object for the table hg_admin_dept.
|
||||
type AdminDeptDao 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 AdminDeptColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminDeptColumns defines and stores column names for the table hg_admin_dept.
|
||||
type AdminDeptColumns struct {
|
||||
Id string // 部门ID
|
||||
Pid string // 父部门ID
|
||||
Name string // 部门名称
|
||||
Code string // 部门编码
|
||||
Type string // 部门类型
|
||||
Leader string // 负责人
|
||||
Phone string // 联系电话
|
||||
Email string // 邮箱
|
||||
Level string // 关系树等级
|
||||
Tree string // 关系树
|
||||
Sort string // 排序
|
||||
Status string // 部门状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// adminDeptColumns holds the columns for the table hg_admin_dept.
|
||||
var adminDeptColumns = AdminDeptColumns{
|
||||
Id: "id",
|
||||
Pid: "pid",
|
||||
Name: "name",
|
||||
Code: "code",
|
||||
Type: "type",
|
||||
Leader: "leader",
|
||||
Phone: "phone",
|
||||
Email: "email",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAdminDeptDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminDeptDao(handlers ...gdb.ModelHandler) *AdminDeptDao {
|
||||
return &AdminDeptDao{
|
||||
group: "default",
|
||||
table: "hg_admin_dept",
|
||||
columns: adminDeptColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminDeptDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminDeptDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminDeptDao) Columns() AdminDeptColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminDeptDao) 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 *AdminDeptDao) 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 *AdminDeptDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+133
@@ -0,0 +1,133 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminMemberDao is the data access object for the table hg_admin_member.
|
||||
type AdminMemberDao 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 AdminMemberColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminMemberColumns defines and stores column names for the table hg_admin_member.
|
||||
type AdminMemberColumns struct {
|
||||
Id string // 管理员ID
|
||||
DeptId string // 部门ID
|
||||
RoleId string // 角色ID
|
||||
RealName string // 真实姓名
|
||||
Username string // 帐号
|
||||
PasswordHash string // 密码
|
||||
Salt string // 密码盐
|
||||
PasswordResetToken string // 密码重置令牌
|
||||
Integral string // 积分
|
||||
Balance string // 余额
|
||||
Avatar string // 头像
|
||||
Sex string // 性别
|
||||
Qq string // qq
|
||||
Email string // 邮箱
|
||||
Mobile string // 手机号码
|
||||
Birthday string // 生日
|
||||
CityId string // 城市编码
|
||||
Address string // 联系地址
|
||||
Pid string // 上级管理员ID
|
||||
Level string // 关系树等级
|
||||
Tree string // 关系树
|
||||
InviteCode string // 邀请码
|
||||
Cash string // 提现配置
|
||||
LastActiveAt string // 最后活跃时间
|
||||
Remark string // 备注
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// adminMemberColumns holds the columns for the table hg_admin_member.
|
||||
var adminMemberColumns = AdminMemberColumns{
|
||||
Id: "id",
|
||||
DeptId: "dept_id",
|
||||
RoleId: "role_id",
|
||||
RealName: "real_name",
|
||||
Username: "username",
|
||||
PasswordHash: "password_hash",
|
||||
Salt: "salt",
|
||||
PasswordResetToken: "password_reset_token",
|
||||
Integral: "integral",
|
||||
Balance: "balance",
|
||||
Avatar: "avatar",
|
||||
Sex: "sex",
|
||||
Qq: "qq",
|
||||
Email: "email",
|
||||
Mobile: "mobile",
|
||||
Birthday: "birthday",
|
||||
CityId: "city_id",
|
||||
Address: "address",
|
||||
Pid: "pid",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
InviteCode: "invite_code",
|
||||
Cash: "cash",
|
||||
LastActiveAt: "last_active_at",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAdminMemberDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminMemberDao(handlers ...gdb.ModelHandler) *AdminMemberDao {
|
||||
return &AdminMemberDao{
|
||||
group: "default",
|
||||
table: "hg_admin_member",
|
||||
columns: adminMemberColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminMemberDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminMemberDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminMemberDao) Columns() AdminMemberColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminMemberDao) 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 *AdminMemberDao) 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 *AdminMemberDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminMemberPostDao is the data access object for the table hg_admin_member_post.
|
||||
type AdminMemberPostDao 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 AdminMemberPostColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminMemberPostColumns defines and stores column names for the table hg_admin_member_post.
|
||||
type AdminMemberPostColumns struct {
|
||||
MemberId string // 管理员ID
|
||||
PostId string // 岗位ID
|
||||
}
|
||||
|
||||
// adminMemberPostColumns holds the columns for the table hg_admin_member_post.
|
||||
var adminMemberPostColumns = AdminMemberPostColumns{
|
||||
MemberId: "member_id",
|
||||
PostId: "post_id",
|
||||
}
|
||||
|
||||
// NewAdminMemberPostDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminMemberPostDao(handlers ...gdb.ModelHandler) *AdminMemberPostDao {
|
||||
return &AdminMemberPostDao{
|
||||
group: "default",
|
||||
table: "hg_admin_member_post",
|
||||
columns: adminMemberPostColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminMemberPostDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminMemberPostDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminMemberPostDao) Columns() AdminMemberPostColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminMemberPostDao) 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 *AdminMemberPostDao) 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 *AdminMemberPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminMemberRoleDao is the data access object for the table hg_admin_member_role.
|
||||
type AdminMemberRoleDao 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 AdminMemberRoleColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminMemberRoleColumns defines and stores column names for the table hg_admin_member_role.
|
||||
type AdminMemberRoleColumns struct {
|
||||
MemberId string // 管理员ID
|
||||
RoleId string // 角色ID
|
||||
}
|
||||
|
||||
// adminMemberRoleColumns holds the columns for the table hg_admin_member_role.
|
||||
var adminMemberRoleColumns = AdminMemberRoleColumns{
|
||||
MemberId: "member_id",
|
||||
RoleId: "role_id",
|
||||
}
|
||||
|
||||
// NewAdminMemberRoleDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminMemberRoleDao(handlers ...gdb.ModelHandler) *AdminMemberRoleDao {
|
||||
return &AdminMemberRoleDao{
|
||||
group: "default",
|
||||
table: "hg_admin_member_role",
|
||||
columns: adminMemberRoleColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminMemberRoleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminMemberRoleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminMemberRoleDao) Columns() AdminMemberRoleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminMemberRoleDao) 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 *AdminMemberRoleDao) 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 *AdminMemberRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+129
@@ -0,0 +1,129 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminMenuDao is the data access object for the table hg_admin_menu.
|
||||
type AdminMenuDao 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 AdminMenuColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminMenuColumns defines and stores column names for the table hg_admin_menu.
|
||||
type AdminMenuColumns struct {
|
||||
Id string // 菜单ID
|
||||
Pid string // 父菜单ID
|
||||
Level string // 关系树等级
|
||||
Tree string // 关系树
|
||||
Title string // 菜单名称
|
||||
Name string // 名称编码
|
||||
Path string // 路由地址
|
||||
Icon string // 菜单图标
|
||||
Type string // 菜单类型(1目录 2菜单 3按钮)
|
||||
Redirect string // 重定向地址
|
||||
Permissions string // 菜单包含权限集合
|
||||
PermissionName string // 权限名称
|
||||
Component string // 组件路径
|
||||
AlwaysShow string // 取消自动计算根路由模式
|
||||
ActiveMenu string // 高亮菜单编码
|
||||
IsRoot string // 是否跟路由
|
||||
IsFrame string // 是否内嵌
|
||||
FrameSrc string // 内联外部地址
|
||||
KeepAlive string // 缓存该路由
|
||||
Hidden string // 是否隐藏
|
||||
Affix string // 是否固定
|
||||
Sort string // 排序
|
||||
Remark string // 备注
|
||||
Status string // 菜单状态
|
||||
UpdatedAt string // 更新时间
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
// adminMenuColumns holds the columns for the table hg_admin_menu.
|
||||
var adminMenuColumns = AdminMenuColumns{
|
||||
Id: "id",
|
||||
Pid: "pid",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
Title: "title",
|
||||
Name: "name",
|
||||
Path: "path",
|
||||
Icon: "icon",
|
||||
Type: "type",
|
||||
Redirect: "redirect",
|
||||
Permissions: "permissions",
|
||||
PermissionName: "permission_name",
|
||||
Component: "component",
|
||||
AlwaysShow: "always_show",
|
||||
ActiveMenu: "active_menu",
|
||||
IsRoot: "is_root",
|
||||
IsFrame: "is_frame",
|
||||
FrameSrc: "frame_src",
|
||||
KeepAlive: "keep_alive",
|
||||
Hidden: "hidden",
|
||||
Affix: "affix",
|
||||
Sort: "sort",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
UpdatedAt: "updated_at",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewAdminMenuDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminMenuDao(handlers ...gdb.ModelHandler) *AdminMenuDao {
|
||||
return &AdminMenuDao{
|
||||
group: "default",
|
||||
table: "hg_admin_menu",
|
||||
columns: adminMenuColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminMenuDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminMenuDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminMenuDao) Columns() AdminMenuColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminMenuDao) 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 *AdminMenuDao) 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 *AdminMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+105
@@ -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"
|
||||
)
|
||||
|
||||
// AdminNoticeDao is the data access object for the table hg_admin_notice.
|
||||
type AdminNoticeDao 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 AdminNoticeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminNoticeColumns defines and stores column names for the table hg_admin_notice.
|
||||
type AdminNoticeColumns struct {
|
||||
Id string // 公告ID
|
||||
Title string // 公告标题
|
||||
Type string // 公告类型
|
||||
Tag string // 标签
|
||||
Content string // 公告内容
|
||||
Receiver string // 接收者
|
||||
Remark string // 备注
|
||||
Sort string // 排序
|
||||
Status string // 公告状态
|
||||
CreatedBy string // 发送人
|
||||
UpdatedBy string // 修改人
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// adminNoticeColumns holds the columns for the table hg_admin_notice.
|
||||
var adminNoticeColumns = AdminNoticeColumns{
|
||||
Id: "id",
|
||||
Title: "title",
|
||||
Type: "type",
|
||||
Tag: "tag",
|
||||
Content: "content",
|
||||
Receiver: "receiver",
|
||||
Remark: "remark",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewAdminNoticeDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminNoticeDao(handlers ...gdb.ModelHandler) *AdminNoticeDao {
|
||||
return &AdminNoticeDao{
|
||||
group: "default",
|
||||
table: "hg_admin_notice",
|
||||
columns: adminNoticeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminNoticeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminNoticeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminNoticeDao) Columns() AdminNoticeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminNoticeDao) 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 *AdminNoticeDao) 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 *AdminNoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminNoticeReadDao is the data access object for the table hg_admin_notice_read.
|
||||
type AdminNoticeReadDao 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 AdminNoticeReadColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminNoticeReadColumns defines and stores column names for the table hg_admin_notice_read.
|
||||
type AdminNoticeReadColumns struct {
|
||||
Id string // 记录ID
|
||||
NoticeId string // 公告ID
|
||||
MemberId string // 会员ID
|
||||
Clicks string // 已读次数
|
||||
UpdatedAt string // 更新时间
|
||||
CreatedAt string // 阅读时间
|
||||
}
|
||||
|
||||
// adminNoticeReadColumns holds the columns for the table hg_admin_notice_read.
|
||||
var adminNoticeReadColumns = AdminNoticeReadColumns{
|
||||
Id: "id",
|
||||
NoticeId: "notice_id",
|
||||
MemberId: "member_id",
|
||||
Clicks: "clicks",
|
||||
UpdatedAt: "updated_at",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewAdminNoticeReadDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminNoticeReadDao(handlers ...gdb.ModelHandler) *AdminNoticeReadDao {
|
||||
return &AdminNoticeReadDao{
|
||||
group: "default",
|
||||
table: "hg_admin_notice_read",
|
||||
columns: adminNoticeReadColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminNoticeReadDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminNoticeReadDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminNoticeReadDao) Columns() AdminNoticeReadColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminNoticeReadDao) 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 *AdminNoticeReadDao) 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 *AdminNoticeReadDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+107
@@ -0,0 +1,107 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminOauthDao is the data access object for the table hg_admin_oauth.
|
||||
type AdminOauthDao 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 AdminOauthColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminOauthColumns defines and stores column names for the table hg_admin_oauth.
|
||||
type AdminOauthColumns struct {
|
||||
Id string // 主键
|
||||
MemberId string // 用户ID
|
||||
Unionid string // 唯一ID
|
||||
OauthClient string // 授权组别
|
||||
OauthOpenid string // 授权开放ID
|
||||
Sex string // 性别
|
||||
Nickname string // 昵称
|
||||
HeadPortrait string // 头像
|
||||
Birthday string // 生日
|
||||
Country string // 国家
|
||||
Province string // 省
|
||||
City string // 市
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// adminOauthColumns holds the columns for the table hg_admin_oauth.
|
||||
var adminOauthColumns = AdminOauthColumns{
|
||||
Id: "id",
|
||||
MemberId: "member_id",
|
||||
Unionid: "unionid",
|
||||
OauthClient: "oauth_client",
|
||||
OauthOpenid: "oauth_openid",
|
||||
Sex: "sex",
|
||||
Nickname: "nickname",
|
||||
HeadPortrait: "head_portrait",
|
||||
Birthday: "birthday",
|
||||
Country: "country",
|
||||
Province: "province",
|
||||
City: "city",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAdminOauthDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminOauthDao(handlers ...gdb.ModelHandler) *AdminOauthDao {
|
||||
return &AdminOauthDao{
|
||||
group: "default",
|
||||
table: "hg_admin_oauth",
|
||||
columns: adminOauthColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminOauthDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminOauthDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminOauthDao) Columns() AdminOauthColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminOauthDao) 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 *AdminOauthDao) 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 *AdminOauthDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+101
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminOrderDao is the data access object for the table hg_admin_order.
|
||||
type AdminOrderDao 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 AdminOrderColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminOrderColumns defines and stores column names for the table hg_admin_order.
|
||||
type AdminOrderColumns struct {
|
||||
Id string // 主键
|
||||
MemberId string // 管理员id
|
||||
OrderType string // 订单类型
|
||||
ProductId string // 产品id
|
||||
OrderSn string // 关联订单号
|
||||
Money string // 充值金额
|
||||
Remark string // 备注
|
||||
RefundReason string // 退款原因
|
||||
RejectRefundReason string // 拒绝退款原因
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// adminOrderColumns holds the columns for the table hg_admin_order.
|
||||
var adminOrderColumns = AdminOrderColumns{
|
||||
Id: "id",
|
||||
MemberId: "member_id",
|
||||
OrderType: "order_type",
|
||||
ProductId: "product_id",
|
||||
OrderSn: "order_sn",
|
||||
Money: "money",
|
||||
Remark: "remark",
|
||||
RefundReason: "refund_reason",
|
||||
RejectRefundReason: "reject_refund_reason",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAdminOrderDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminOrderDao(handlers ...gdb.ModelHandler) *AdminOrderDao {
|
||||
return &AdminOrderDao{
|
||||
group: "default",
|
||||
table: "hg_admin_order",
|
||||
columns: adminOrderColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminOrderDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminOrderDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminOrderDao) Columns() AdminOrderColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminOrderDao) 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 *AdminOrderDao) 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 *AdminOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminPostDao is the data access object for the table hg_admin_post.
|
||||
type AdminPostDao 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 AdminPostColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminPostColumns defines and stores column names for the table hg_admin_post.
|
||||
type AdminPostColumns struct {
|
||||
Id string // 岗位ID
|
||||
Code string // 岗位编码
|
||||
Name string // 岗位名称
|
||||
Remark string // 备注
|
||||
Sort string // 排序
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// adminPostColumns holds the columns for the table hg_admin_post.
|
||||
var adminPostColumns = AdminPostColumns{
|
||||
Id: "id",
|
||||
Code: "code",
|
||||
Name: "name",
|
||||
Remark: "remark",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAdminPostDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminPostDao(handlers ...gdb.ModelHandler) *AdminPostDao {
|
||||
return &AdminPostDao{
|
||||
group: "default",
|
||||
table: "hg_admin_post",
|
||||
columns: adminPostColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminPostDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminPostDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminPostDao) Columns() AdminPostColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminPostDao) 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 *AdminPostDao) 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 *AdminPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+103
@@ -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"
|
||||
)
|
||||
|
||||
// AdminRoleDao is the data access object for the table hg_admin_role.
|
||||
type AdminRoleDao 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 AdminRoleColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminRoleColumns defines and stores column names for the table hg_admin_role.
|
||||
type AdminRoleColumns struct {
|
||||
Id string // 角色ID
|
||||
Name string // 角色名称
|
||||
Key string // 角色权限字符串
|
||||
DataScope string // 数据范围
|
||||
CustomDept string // 自定义部门权限
|
||||
Pid string // 上级角色ID
|
||||
Level string // 关系树等级
|
||||
Tree string // 关系树
|
||||
Remark string // 备注
|
||||
Sort string // 排序
|
||||
Status string // 角色状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// adminRoleColumns holds the columns for the table hg_admin_role.
|
||||
var adminRoleColumns = AdminRoleColumns{
|
||||
Id: "id",
|
||||
Name: "name",
|
||||
Key: "key",
|
||||
DataScope: "data_scope",
|
||||
CustomDept: "custom_dept",
|
||||
Pid: "pid",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
Remark: "remark",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAdminRoleDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminRoleDao(handlers ...gdb.ModelHandler) *AdminRoleDao {
|
||||
return &AdminRoleDao{
|
||||
group: "default",
|
||||
table: "hg_admin_role",
|
||||
columns: adminRoleColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminRoleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminRoleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminRoleDao) Columns() AdminRoleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminRoleDao) 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 *AdminRoleDao) 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 *AdminRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminRoleCasbinDao is the data access object for the table hg_admin_role_casbin.
|
||||
type AdminRoleCasbinDao 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 AdminRoleCasbinColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminRoleCasbinColumns defines and stores column names for the table hg_admin_role_casbin.
|
||||
type AdminRoleCasbinColumns struct {
|
||||
Id string //
|
||||
PType string //
|
||||
V0 string //
|
||||
V1 string //
|
||||
V2 string //
|
||||
V3 string //
|
||||
V4 string //
|
||||
V5 string //
|
||||
}
|
||||
|
||||
// adminRoleCasbinColumns holds the columns for the table hg_admin_role_casbin.
|
||||
var adminRoleCasbinColumns = AdminRoleCasbinColumns{
|
||||
Id: "id",
|
||||
PType: "p_type",
|
||||
V0: "v0",
|
||||
V1: "v1",
|
||||
V2: "v2",
|
||||
V3: "v3",
|
||||
V4: "v4",
|
||||
V5: "v5",
|
||||
}
|
||||
|
||||
// NewAdminRoleCasbinDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminRoleCasbinDao(handlers ...gdb.ModelHandler) *AdminRoleCasbinDao {
|
||||
return &AdminRoleCasbinDao{
|
||||
group: "default",
|
||||
table: "hg_admin_role_casbin",
|
||||
columns: adminRoleCasbinColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminRoleCasbinDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminRoleCasbinDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminRoleCasbinDao) Columns() AdminRoleCasbinColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminRoleCasbinDao) 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 *AdminRoleCasbinDao) 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 *AdminRoleCasbinDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminRoleMenuDao is the data access object for the table hg_admin_role_menu.
|
||||
type AdminRoleMenuDao 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 AdminRoleMenuColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AdminRoleMenuColumns defines and stores column names for the table hg_admin_role_menu.
|
||||
type AdminRoleMenuColumns struct {
|
||||
RoleId string // 角色ID
|
||||
MenuId string // 菜单ID
|
||||
}
|
||||
|
||||
// adminRoleMenuColumns holds the columns for the table hg_admin_role_menu.
|
||||
var adminRoleMenuColumns = AdminRoleMenuColumns{
|
||||
RoleId: "role_id",
|
||||
MenuId: "menu_id",
|
||||
}
|
||||
|
||||
// NewAdminRoleMenuDao creates and returns a new DAO object for table data access.
|
||||
func NewAdminRoleMenuDao(handlers ...gdb.ModelHandler) *AdminRoleMenuDao {
|
||||
return &AdminRoleMenuDao{
|
||||
group: "default",
|
||||
table: "hg_admin_role_menu",
|
||||
columns: adminRoleMenuColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AdminRoleMenuDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AdminRoleMenuDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AdminRoleMenuDao) Columns() AdminRoleMenuColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AdminRoleMenuDao) 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 *AdminRoleMenuDao) 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 *AdminRoleMenuDao) 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,135 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AppMemberDao is the data access object for the table hg_app_member.
|
||||
type AppMemberDao 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 AppMemberColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberColumns defines and stores column names for the table hg_app_member.
|
||||
type AppMemberColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
MemberNo string // 会员编号
|
||||
Username string // 用户名
|
||||
MobileCipher string // 手机号密文(AES-GCM)
|
||||
MobileHash string // 手机号检索哈希(HMAC-SHA256)
|
||||
MobileMask string // 手机号脱敏值
|
||||
PasswordHash string // 登录密码哈希(bcrypt)
|
||||
TradePasswordHash string // 交易密码哈希
|
||||
LevelId string // 会员等级ID
|
||||
ParentId string // 上级会员ID
|
||||
Level string // 团队层级
|
||||
Tree string // 关系树
|
||||
InviteCode string // 邀请码
|
||||
MemberStatus string // 会员状态
|
||||
RiskStatus string // 风控状态
|
||||
AutoDispatch string // 自动派单
|
||||
CreditScore string // 信用分
|
||||
IsTestAccount string // 测试账号
|
||||
LastLoginAt string // 最后登录时间
|
||||
LastLoginIpCipher string // 最后登录IP密文
|
||||
LastLoginIpMask string // 最后登录IP脱敏值
|
||||
LastLoginRegion string // 最后登录地区
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 注销时间
|
||||
}
|
||||
|
||||
// appMemberColumns holds the columns for the table hg_app_member.
|
||||
var appMemberColumns = AppMemberColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
MemberNo: "member_no",
|
||||
Username: "username",
|
||||
MobileCipher: "mobile_cipher",
|
||||
MobileHash: "mobile_hash",
|
||||
MobileMask: "mobile_mask",
|
||||
PasswordHash: "password_hash",
|
||||
TradePasswordHash: "trade_password_hash",
|
||||
LevelId: "level_id",
|
||||
ParentId: "parent_id",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
InviteCode: "invite_code",
|
||||
MemberStatus: "member_status",
|
||||
RiskStatus: "risk_status",
|
||||
AutoDispatch: "auto_dispatch",
|
||||
CreditScore: "credit_score",
|
||||
IsTestAccount: "is_test_account",
|
||||
LastLoginAt: "last_login_at",
|
||||
LastLoginIpCipher: "last_login_ip_cipher",
|
||||
LastLoginIpMask: "last_login_ip_mask",
|
||||
LastLoginRegion: "last_login_region",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewAppMemberDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberDao(handlers ...gdb.ModelHandler) *AppMemberDao {
|
||||
return &AppMemberDao{
|
||||
group: "default",
|
||||
table: "hg_app_member",
|
||||
columns: appMemberColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberDao) Columns() AppMemberColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberDao) 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 *AppMemberDao) 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 *AppMemberDao) 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,115 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AppMemberAddressDao is the data access object for the table hg_app_member_address.
|
||||
type AppMemberAddressDao 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 AppMemberAddressColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberAddressColumns defines and stores column names for the table hg_app_member_address.
|
||||
type AppMemberAddressColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
MemberId string // 会员ID
|
||||
ReceiverCipher string // 收货人密文
|
||||
ReceiverMask string // 收货人脱敏值
|
||||
MobileCipher string // 手机号密文
|
||||
MobileMask string // 手机号脱敏值
|
||||
Province string // 省
|
||||
City string // 市
|
||||
District string // 区县
|
||||
AddressCipher string // 详细地址密文
|
||||
AddressMask string // 详细地址脱敏值
|
||||
IsDefault string // 默认地址
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// appMemberAddressColumns holds the columns for the table hg_app_member_address.
|
||||
var appMemberAddressColumns = AppMemberAddressColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
MemberId: "member_id",
|
||||
ReceiverCipher: "receiver_cipher",
|
||||
ReceiverMask: "receiver_mask",
|
||||
MobileCipher: "mobile_cipher",
|
||||
MobileMask: "mobile_mask",
|
||||
Province: "province",
|
||||
City: "city",
|
||||
District: "district",
|
||||
AddressCipher: "address_cipher",
|
||||
AddressMask: "address_mask",
|
||||
IsDefault: "is_default",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewAppMemberAddressDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberAddressDao(handlers ...gdb.ModelHandler) *AppMemberAddressDao {
|
||||
return &AppMemberAddressDao{
|
||||
group: "default",
|
||||
table: "hg_app_member_address",
|
||||
columns: appMemberAddressColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberAddressDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberAddressDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberAddressDao) Columns() AppMemberAddressColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberAddressDao) 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 *AppMemberAddressDao) 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 *AppMemberAddressDao) 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,111 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AppMemberLevelDao is the data access object for the table hg_app_member_level.
|
||||
type AppMemberLevelDao 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 AppMemberLevelColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberLevelColumns defines and stores column names for the table hg_app_member_level.
|
||||
type AppMemberLevelColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
LevelCode string // 稳定等级编码
|
||||
Name string // 等级名称
|
||||
IconAttachmentId string // 图标附件ID
|
||||
IconUrl string // 图标URL
|
||||
CurrentVersionId string // 当前发布版本ID
|
||||
MemberCount string // 会员数(可重建)
|
||||
Status string // 状态 1正常 2停用
|
||||
Sort string // 排序
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// appMemberLevelColumns holds the columns for the table hg_app_member_level.
|
||||
var appMemberLevelColumns = AppMemberLevelColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
LevelCode: "level_code",
|
||||
Name: "name",
|
||||
IconAttachmentId: "icon_attachment_id",
|
||||
IconUrl: "icon_url",
|
||||
CurrentVersionId: "current_version_id",
|
||||
MemberCount: "member_count",
|
||||
Status: "status",
|
||||
Sort: "sort",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewAppMemberLevelDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberLevelDao(handlers ...gdb.ModelHandler) *AppMemberLevelDao {
|
||||
return &AppMemberLevelDao{
|
||||
group: "default",
|
||||
table: "hg_app_member_level",
|
||||
columns: appMemberLevelColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberLevelDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberLevelDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberLevelDao) Columns() AppMemberLevelColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberLevelDao) 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 *AppMemberLevelDao) 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 *AppMemberLevelDao) 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,119 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AppMemberLevelVersionDao is the data access object for the table hg_app_member_level_version.
|
||||
type AppMemberLevelVersionDao 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 AppMemberLevelVersionColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberLevelVersionColumns defines and stores column names for the table hg_app_member_level_version.
|
||||
type AppMemberLevelVersionColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
LevelId string // 等级ID
|
||||
VersionNo string // 版本号
|
||||
UpgradeAmount string // 升级金额(分)
|
||||
GiftAmount string // 赠送金额(分)
|
||||
DailyOrderLimit string // 每日接单次数
|
||||
CommissionRate string // 佣金万分比
|
||||
DailyWithdrawLimit string // 每日提现次数
|
||||
RuleJson string // 扩展规则快照
|
||||
PublishStatus string // 发布状态
|
||||
EffectiveAt string // 计划生效时间
|
||||
PublishedAt string // 发布时间
|
||||
ApprovalRequestId string // 审批单ID
|
||||
BaseVersionId string // 基础版本ID
|
||||
Version string // 乐观锁
|
||||
Remark string // 变更说明
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// appMemberLevelVersionColumns holds the columns for the table hg_app_member_level_version.
|
||||
var appMemberLevelVersionColumns = AppMemberLevelVersionColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
LevelId: "level_id",
|
||||
VersionNo: "version_no",
|
||||
UpgradeAmount: "upgrade_amount",
|
||||
GiftAmount: "gift_amount",
|
||||
DailyOrderLimit: "daily_order_limit",
|
||||
CommissionRate: "commission_rate",
|
||||
DailyWithdrawLimit: "daily_withdraw_limit",
|
||||
RuleJson: "rule_json",
|
||||
PublishStatus: "publish_status",
|
||||
EffectiveAt: "effective_at",
|
||||
PublishedAt: "published_at",
|
||||
ApprovalRequestId: "approval_request_id",
|
||||
BaseVersionId: "base_version_id",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAppMemberLevelVersionDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberLevelVersionDao(handlers ...gdb.ModelHandler) *AppMemberLevelVersionDao {
|
||||
return &AppMemberLevelVersionDao{
|
||||
group: "default",
|
||||
table: "hg_app_member_level_version",
|
||||
columns: appMemberLevelVersionColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberLevelVersionDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberLevelVersionDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberLevelVersionDao) Columns() AppMemberLevelVersionColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberLevelVersionDao) 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 *AppMemberLevelVersionDao) 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 *AppMemberLevelVersionDao) 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"
|
||||
)
|
||||
|
||||
// AppMemberNoticeDao is the data access object for the table hg_app_member_notice.
|
||||
type AppMemberNoticeDao 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 AppMemberNoticeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberNoticeColumns defines and stores column names for the table hg_app_member_notice.
|
||||
type AppMemberNoticeColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
MemberId string // 会员ID,0为全体
|
||||
Title string // 标题
|
||||
Content string // 内容
|
||||
SourceType string // 来源 1真实通知 2运营模拟
|
||||
StartAt string // 开始时间
|
||||
EndAt string // 结束时间
|
||||
NoticeStatus string // 状态 1有效 2撤回
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// appMemberNoticeColumns holds the columns for the table hg_app_member_notice.
|
||||
var appMemberNoticeColumns = AppMemberNoticeColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
MemberId: "member_id",
|
||||
Title: "title",
|
||||
Content: "content",
|
||||
SourceType: "source_type",
|
||||
StartAt: "start_at",
|
||||
EndAt: "end_at",
|
||||
NoticeStatus: "notice_status",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAppMemberNoticeDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberNoticeDao(handlers ...gdb.ModelHandler) *AppMemberNoticeDao {
|
||||
return &AppMemberNoticeDao{
|
||||
group: "default",
|
||||
table: "hg_app_member_notice",
|
||||
columns: appMemberNoticeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberNoticeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberNoticeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberNoticeDao) Columns() AppMemberNoticeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberNoticeDao) 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 *AppMemberNoticeDao) 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 *AppMemberNoticeDao) 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,121 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AppMemberPaymentAccountDao is the data access object for the table hg_app_member_payment_account.
|
||||
type AppMemberPaymentAccountDao 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 AppMemberPaymentAccountColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberPaymentAccountColumns defines and stores column names for the table hg_app_member_payment_account.
|
||||
type AppMemberPaymentAccountColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
MemberId string // 会员ID
|
||||
AccountType string // 账户类型
|
||||
BankCode string // 银行编码
|
||||
BankName string // 银行名称
|
||||
HolderCipher string // 持有人密文
|
||||
HolderMask string // 持有人脱敏值
|
||||
MobileCipher string // 预留手机号密文
|
||||
MobileMask string // 预留手机号脱敏值
|
||||
AccountNoCipher string // 账号密文
|
||||
AccountNoHash string // 账号检索哈希
|
||||
AccountNoMask string // 账号脱敏值
|
||||
QrAttachmentId string // 收款码附件ID
|
||||
VerifyStatus string // 核验状态
|
||||
IsDefault string // 默认账户
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// appMemberPaymentAccountColumns holds the columns for the table hg_app_member_payment_account.
|
||||
var appMemberPaymentAccountColumns = AppMemberPaymentAccountColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
MemberId: "member_id",
|
||||
AccountType: "account_type",
|
||||
BankCode: "bank_code",
|
||||
BankName: "bank_name",
|
||||
HolderCipher: "holder_cipher",
|
||||
HolderMask: "holder_mask",
|
||||
MobileCipher: "mobile_cipher",
|
||||
MobileMask: "mobile_mask",
|
||||
AccountNoCipher: "account_no_cipher",
|
||||
AccountNoHash: "account_no_hash",
|
||||
AccountNoMask: "account_no_mask",
|
||||
QrAttachmentId: "qr_attachment_id",
|
||||
VerifyStatus: "verify_status",
|
||||
IsDefault: "is_default",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewAppMemberPaymentAccountDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberPaymentAccountDao(handlers ...gdb.ModelHandler) *AppMemberPaymentAccountDao {
|
||||
return &AppMemberPaymentAccountDao{
|
||||
group: "default",
|
||||
table: "hg_app_member_payment_account",
|
||||
columns: appMemberPaymentAccountColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberPaymentAccountDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberPaymentAccountDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberPaymentAccountDao) Columns() AppMemberPaymentAccountColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberPaymentAccountDao) 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 *AppMemberPaymentAccountDao) 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 *AppMemberPaymentAccountDao) 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,107 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AppMemberProfileDao is the data access object for the table hg_app_member_profile.
|
||||
type AppMemberProfileDao 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 AppMemberProfileColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberProfileColumns defines and stores column names for the table hg_app_member_profile.
|
||||
type AppMemberProfileColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
MemberId string // 会员ID
|
||||
RealNameCipher string // 真实姓名密文
|
||||
RealNameMask string // 真实姓名脱敏值
|
||||
IdNoCipher string // 证件号密文
|
||||
IdNoHash string // 证件号检索哈希
|
||||
IdNoMask string // 证件号脱敏值
|
||||
AvatarAttachmentId string // 头像附件ID
|
||||
KycStatus string // 实名状态
|
||||
KycVerifiedAt string // 实名时间
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// appMemberProfileColumns holds the columns for the table hg_app_member_profile.
|
||||
var appMemberProfileColumns = AppMemberProfileColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
MemberId: "member_id",
|
||||
RealNameCipher: "real_name_cipher",
|
||||
RealNameMask: "real_name_mask",
|
||||
IdNoCipher: "id_no_cipher",
|
||||
IdNoHash: "id_no_hash",
|
||||
IdNoMask: "id_no_mask",
|
||||
AvatarAttachmentId: "avatar_attachment_id",
|
||||
KycStatus: "kyc_status",
|
||||
KycVerifiedAt: "kyc_verified_at",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewAppMemberProfileDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberProfileDao(handlers ...gdb.ModelHandler) *AppMemberProfileDao {
|
||||
return &AppMemberProfileDao{
|
||||
group: "default",
|
||||
table: "hg_app_member_profile",
|
||||
columns: appMemberProfileColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberProfileDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberProfileDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberProfileDao) Columns() AppMemberProfileColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberProfileDao) 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 *AppMemberProfileDao) 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 *AppMemberProfileDao) 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,101 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AppMemberStatusLogDao is the data access object for the table hg_app_member_status_log.
|
||||
type AppMemberStatusLogDao 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 AppMemberStatusLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// AppMemberStatusLogColumns defines and stores column names for the table hg_app_member_status_log.
|
||||
type AppMemberStatusLogColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
MemberId string // 会员ID
|
||||
FromStatus string // 原状态
|
||||
ToStatus string // 目标状态
|
||||
ReasonCode string // 原因编码
|
||||
ReasonText string // 原因说明
|
||||
EffectiveAt string // 生效时间
|
||||
ExpireAt string // 失效时间
|
||||
ApprovalRequestId string // 审批单ID
|
||||
OperatorId string // 执行人
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
// appMemberStatusLogColumns holds the columns for the table hg_app_member_status_log.
|
||||
var appMemberStatusLogColumns = AppMemberStatusLogColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
MemberId: "member_id",
|
||||
FromStatus: "from_status",
|
||||
ToStatus: "to_status",
|
||||
ReasonCode: "reason_code",
|
||||
ReasonText: "reason_text",
|
||||
EffectiveAt: "effective_at",
|
||||
ExpireAt: "expire_at",
|
||||
ApprovalRequestId: "approval_request_id",
|
||||
OperatorId: "operator_id",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewAppMemberStatusLogDao creates and returns a new DAO object for table data access.
|
||||
func NewAppMemberStatusLogDao(handlers ...gdb.ModelHandler) *AppMemberStatusLogDao {
|
||||
return &AppMemberStatusLogDao{
|
||||
group: "default",
|
||||
table: "hg_app_member_status_log",
|
||||
columns: appMemberStatusLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *AppMemberStatusLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *AppMemberStatusLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *AppMemberStatusLogDao) Columns() AppMemberStatusLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *AppMemberStatusLogDao) 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 *AppMemberStatusLogDao) 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 *AppMemberStatusLogDao) 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,101 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ApprovalActionDao is the data access object for the table hg_approval_action.
|
||||
type ApprovalActionDao 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 ApprovalActionColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// ApprovalActionColumns defines and stores column names for the table hg_approval_action.
|
||||
type ApprovalActionColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ApprovalRequestId string // 审批请求ID
|
||||
StepNo string // 节点顺序
|
||||
ActorId string // 操作人
|
||||
Action string // 审批动作
|
||||
ReasonCode string // 原因编码
|
||||
Comment string // 审批意见
|
||||
SnapshotJson string // 操作时快照
|
||||
ActorIpCipher string // 操作IP密文
|
||||
MfaVerified string // 是否二次认证
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
// approvalActionColumns holds the columns for the table hg_approval_action.
|
||||
var approvalActionColumns = ApprovalActionColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ApprovalRequestId: "approval_request_id",
|
||||
StepNo: "step_no",
|
||||
ActorId: "actor_id",
|
||||
Action: "action",
|
||||
ReasonCode: "reason_code",
|
||||
Comment: "comment",
|
||||
SnapshotJson: "snapshot_json",
|
||||
ActorIpCipher: "actor_ip_cipher",
|
||||
MfaVerified: "mfa_verified",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewApprovalActionDao creates and returns a new DAO object for table data access.
|
||||
func NewApprovalActionDao(handlers ...gdb.ModelHandler) *ApprovalActionDao {
|
||||
return &ApprovalActionDao{
|
||||
group: "default",
|
||||
table: "hg_approval_action",
|
||||
columns: approvalActionColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *ApprovalActionDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *ApprovalActionDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *ApprovalActionDao) Columns() ApprovalActionColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *ApprovalActionDao) 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 *ApprovalActionDao) 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 *ApprovalActionDao) 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,125 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ApprovalRequestDao is the data access object for the table hg_approval_request.
|
||||
type ApprovalRequestDao 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 ApprovalRequestColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// ApprovalRequestColumns defines and stores column names for the table hg_approval_request.
|
||||
type ApprovalRequestColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ApprovalNo string // 审批单号
|
||||
ApprovalType string // 审批类型
|
||||
TargetType string // 目标类型
|
||||
TargetId string // 目标ID
|
||||
Action string // 拟执行动作
|
||||
Title string // 审批标题
|
||||
PayloadJson string // 待执行数据快照
|
||||
DiffJson string // 前后差异
|
||||
RiskLevel string // 风险级别
|
||||
RequiredApprovals string // 需要通过数
|
||||
ApprovalStatus string // 审批状态
|
||||
ApplicantId string // 申请人
|
||||
SubmittedAt string // 提交时间
|
||||
DecidedAt string // 决定时间
|
||||
ExecutedAt string // 执行时间
|
||||
ExpireAt string // 超时时间
|
||||
Version string // 乐观锁
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// approvalRequestColumns holds the columns for the table hg_approval_request.
|
||||
var approvalRequestColumns = ApprovalRequestColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ApprovalNo: "approval_no",
|
||||
ApprovalType: "approval_type",
|
||||
TargetType: "target_type",
|
||||
TargetId: "target_id",
|
||||
Action: "action",
|
||||
Title: "title",
|
||||
PayloadJson: "payload_json",
|
||||
DiffJson: "diff_json",
|
||||
RiskLevel: "risk_level",
|
||||
RequiredApprovals: "required_approvals",
|
||||
ApprovalStatus: "approval_status",
|
||||
ApplicantId: "applicant_id",
|
||||
SubmittedAt: "submitted_at",
|
||||
DecidedAt: "decided_at",
|
||||
ExecutedAt: "executed_at",
|
||||
ExpireAt: "expire_at",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewApprovalRequestDao creates and returns a new DAO object for table data access.
|
||||
func NewApprovalRequestDao(handlers ...gdb.ModelHandler) *ApprovalRequestDao {
|
||||
return &ApprovalRequestDao{
|
||||
group: "default",
|
||||
table: "hg_approval_request",
|
||||
columns: approvalRequestColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *ApprovalRequestDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *ApprovalRequestDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *ApprovalRequestDao) Columns() ApprovalRequestColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *ApprovalRequestDao) 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 *ApprovalRequestDao) 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 *ApprovalRequestDao) 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,119 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// BannerDao is the data access object for the table hg_banner.
|
||||
type BannerDao 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 BannerColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// BannerColumns defines and stores column names for the table hg_banner.
|
||||
type BannerColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
Name string // 后台名称
|
||||
Position string // 投放位置
|
||||
ImageAttachmentId string // 图片附件ID
|
||||
ImageUrl string // 图片URL
|
||||
AltText string // 替代文本
|
||||
TargetType string // 跳转类型
|
||||
TargetValue string // 跳转值
|
||||
StartAt string // 开始时间
|
||||
EndAt string // 结束时间
|
||||
PublishStatus string // 发布状态
|
||||
Sort string // 排序
|
||||
Version string // 乐观锁
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// bannerColumns holds the columns for the table hg_banner.
|
||||
var bannerColumns = BannerColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
Name: "name",
|
||||
Position: "position",
|
||||
ImageAttachmentId: "image_attachment_id",
|
||||
ImageUrl: "image_url",
|
||||
AltText: "alt_text",
|
||||
TargetType: "target_type",
|
||||
TargetValue: "target_value",
|
||||
StartAt: "start_at",
|
||||
EndAt: "end_at",
|
||||
PublishStatus: "publish_status",
|
||||
Sort: "sort",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewBannerDao creates and returns a new DAO object for table data access.
|
||||
func NewBannerDao(handlers ...gdb.ModelHandler) *BannerDao {
|
||||
return &BannerDao{
|
||||
group: "default",
|
||||
table: "hg_banner",
|
||||
columns: bannerColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *BannerDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *BannerDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *BannerDao) Columns() BannerColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *BannerDao) 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 *BannerDao) 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 *BannerDao) 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,113 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// BizAuditLogDao is the data access object for the table hg_biz_audit_log.
|
||||
type BizAuditLogDao 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 BizAuditLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// BizAuditLogColumns defines and stores column names for the table hg_biz_audit_log.
|
||||
type BizAuditLogColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
AuditNo string // 审计号
|
||||
ActorType string // 操作人类型
|
||||
ActorId string // 操作人ID
|
||||
Module string // 业务模块
|
||||
Action string // 操作动作
|
||||
TargetType string // 目标类型
|
||||
TargetId string // 目标ID
|
||||
BeforeDigest string // 变更前摘要
|
||||
AfterDigest string // 变更后摘要
|
||||
ChangeJson string // 已脱敏差异
|
||||
Reason string // 操作原因
|
||||
ApprovalNo string // 审批单号
|
||||
TraceId string // 链路ID
|
||||
PrevHash string // 前一条哈希
|
||||
RowHash string // 当前行哈希
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
// bizAuditLogColumns holds the columns for the table hg_biz_audit_log.
|
||||
var bizAuditLogColumns = BizAuditLogColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
AuditNo: "audit_no",
|
||||
ActorType: "actor_type",
|
||||
ActorId: "actor_id",
|
||||
Module: "module",
|
||||
Action: "action",
|
||||
TargetType: "target_type",
|
||||
TargetId: "target_id",
|
||||
BeforeDigest: "before_digest",
|
||||
AfterDigest: "after_digest",
|
||||
ChangeJson: "change_json",
|
||||
Reason: "reason",
|
||||
ApprovalNo: "approval_no",
|
||||
TraceId: "trace_id",
|
||||
PrevHash: "prev_hash",
|
||||
RowHash: "row_hash",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewBizAuditLogDao creates and returns a new DAO object for table data access.
|
||||
func NewBizAuditLogDao(handlers ...gdb.ModelHandler) *BizAuditLogDao {
|
||||
return &BizAuditLogDao{
|
||||
group: "default",
|
||||
table: "hg_biz_audit_log",
|
||||
columns: bizAuditLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *BizAuditLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *BizAuditLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *BizAuditLogDao) Columns() BizAuditLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *BizAuditLogDao) 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 *BizAuditLogDao) 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 *BizAuditLogDao) 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,111 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ContentDao is the data access object for the table hg_content.
|
||||
type ContentDao 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 ContentColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// ContentColumns defines and stores column names for the table hg_content.
|
||||
type ContentColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ContentKey string // 稳定内容标识
|
||||
ContentType string // 内容类型
|
||||
Title string // 后台标题
|
||||
PublishedVersionId string // 当前发布版本ID
|
||||
PublishStatus string // 发布状态
|
||||
PublishedAt string // 发布时间
|
||||
Sort string // 排序
|
||||
Version string // 乐观锁
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// contentColumns holds the columns for the table hg_content.
|
||||
var contentColumns = ContentColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ContentKey: "content_key",
|
||||
ContentType: "content_type",
|
||||
Title: "title",
|
||||
PublishedVersionId: "published_version_id",
|
||||
PublishStatus: "publish_status",
|
||||
PublishedAt: "published_at",
|
||||
Sort: "sort",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewContentDao creates and returns a new DAO object for table data access.
|
||||
func NewContentDao(handlers ...gdb.ModelHandler) *ContentDao {
|
||||
return &ContentDao{
|
||||
group: "default",
|
||||
table: "hg_content",
|
||||
columns: contentColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *ContentDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *ContentDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *ContentDao) Columns() ContentColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *ContentDao) 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 *ContentDao) 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 *ContentDao) 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,107 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ContentVersionDao is the data access object for the table hg_content_version.
|
||||
type ContentVersionDao 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 ContentVersionColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// ContentVersionColumns defines and stores column names for the table hg_content_version.
|
||||
type ContentVersionColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ContentId string // 内容ID
|
||||
VersionNo string // 版本号
|
||||
Title string // 展示标题
|
||||
Summary string // 摘要
|
||||
BodyHtml string // 清洗后HTML
|
||||
BodyText string // 降级文本
|
||||
CoverUrl string // 封面图片URL
|
||||
AssetIds string // 引用附件ID
|
||||
PublishStatus string // 发布状态
|
||||
EffectiveAt string // 计划生效时间
|
||||
ApprovalRequestId string // 审批单ID
|
||||
CreatedBy string // 创建者
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
// contentVersionColumns holds the columns for the table hg_content_version.
|
||||
var contentVersionColumns = ContentVersionColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ContentId: "content_id",
|
||||
VersionNo: "version_no",
|
||||
Title: "title",
|
||||
Summary: "summary",
|
||||
BodyHtml: "body_html",
|
||||
BodyText: "body_text",
|
||||
CoverUrl: "cover_url",
|
||||
AssetIds: "asset_ids",
|
||||
PublishStatus: "publish_status",
|
||||
EffectiveAt: "effective_at",
|
||||
ApprovalRequestId: "approval_request_id",
|
||||
CreatedBy: "created_by",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewContentVersionDao creates and returns a new DAO object for table data access.
|
||||
func NewContentVersionDao(handlers ...gdb.ModelHandler) *ContentVersionDao {
|
||||
return &ContentVersionDao{
|
||||
group: "default",
|
||||
table: "hg_content_version",
|
||||
columns: contentVersionColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *ContentVersionDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *ContentVersionDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *ContentVersionDao) Columns() ContentVersionColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *ContentVersionDao) 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 *ContentVersionDao) 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 *ContentVersionDao) 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,115 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// CustomerServiceDao is the data access object for the table hg_customer_service.
|
||||
type CustomerServiceDao 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 CustomerServiceColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// CustomerServiceColumns defines and stores column names for the table hg_customer_service.
|
||||
type CustomerServiceColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ServiceCode string // 客服编码
|
||||
Name string // 客服名称
|
||||
AvatarUrl string // 头像地址
|
||||
WorkTime string // 工作时间说明
|
||||
OnlineStatus string // 在线状态
|
||||
ServiceUrl string // 客服跳转URL
|
||||
BackupContact string // 备用联系方式
|
||||
SessionMapping string // 第三方会话映射
|
||||
Status string // 状态
|
||||
Sort string // 排序
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// customerServiceColumns holds the columns for the table hg_customer_service.
|
||||
var customerServiceColumns = CustomerServiceColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ServiceCode: "service_code",
|
||||
Name: "name",
|
||||
AvatarUrl: "avatar_url",
|
||||
WorkTime: "work_time",
|
||||
OnlineStatus: "online_status",
|
||||
ServiceUrl: "service_url",
|
||||
BackupContact: "backup_contact",
|
||||
SessionMapping: "session_mapping",
|
||||
Status: "status",
|
||||
Sort: "sort",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewCustomerServiceDao creates and returns a new DAO object for table data access.
|
||||
func NewCustomerServiceDao(handlers ...gdb.ModelHandler) *CustomerServiceDao {
|
||||
return &CustomerServiceDao{
|
||||
group: "default",
|
||||
table: "hg_customer_service",
|
||||
columns: customerServiceColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *CustomerServiceDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *CustomerServiceDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *CustomerServiceDao) Columns() CustomerServiceColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *CustomerServiceDao) 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 *CustomerServiceDao) 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 *CustomerServiceDao) 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,99 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// DashboardDailyStatDao is the data access object for the table hg_dashboard_daily_stat.
|
||||
type DashboardDailyStatDao 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 DashboardDailyStatColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// DashboardDailyStatColumns defines and stores column names for the table hg_dashboard_daily_stat.
|
||||
type DashboardDailyStatColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
StatDate string // 统计日期
|
||||
DimensionType string // 维度类型
|
||||
DimensionValue string // 维度值
|
||||
MetricCode string // 指标编码
|
||||
MetricCount string // 指标数量
|
||||
MetricAmount string // 指标金额(最小货币单位)
|
||||
CalculatedAt string // 计算时间
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// dashboardDailyStatColumns holds the columns for the table hg_dashboard_daily_stat.
|
||||
var dashboardDailyStatColumns = DashboardDailyStatColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
StatDate: "stat_date",
|
||||
DimensionType: "dimension_type",
|
||||
DimensionValue: "dimension_value",
|
||||
MetricCode: "metric_code",
|
||||
MetricCount: "metric_count",
|
||||
MetricAmount: "metric_amount",
|
||||
CalculatedAt: "calculated_at",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewDashboardDailyStatDao creates and returns a new DAO object for table data access.
|
||||
func NewDashboardDailyStatDao(handlers ...gdb.ModelHandler) *DashboardDailyStatDao {
|
||||
return &DashboardDailyStatDao{
|
||||
group: "default",
|
||||
table: "hg_dashboard_daily_stat",
|
||||
columns: dashboardDailyStatColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *DashboardDailyStatDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *DashboardDailyStatDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *DashboardDailyStatDao) Columns() DashboardDailyStatColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *DashboardDailyStatDao) 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 *DashboardDailyStatDao) 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 *DashboardDailyStatDao) 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,101 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// FinanceReviewDao is the data access object for the table hg_finance_review.
|
||||
type FinanceReviewDao 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 FinanceReviewColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// FinanceReviewColumns defines and stores column names for the table hg_finance_review.
|
||||
type FinanceReviewColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ApprovalRequestId string // 审批单ID
|
||||
BizType string // 业务类型
|
||||
BizId string // 业务ID
|
||||
ReviewStage string // 审核阶段
|
||||
ReviewerId string // 审核人
|
||||
Decision string // 审核结论
|
||||
ReasonCode string // 原因编码
|
||||
ReasonText string // 审核说明
|
||||
SnapshotJson string // 审核快照
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
// financeReviewColumns holds the columns for the table hg_finance_review.
|
||||
var financeReviewColumns = FinanceReviewColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ApprovalRequestId: "approval_request_id",
|
||||
BizType: "biz_type",
|
||||
BizId: "biz_id",
|
||||
ReviewStage: "review_stage",
|
||||
ReviewerId: "reviewer_id",
|
||||
Decision: "decision",
|
||||
ReasonCode: "reason_code",
|
||||
ReasonText: "reason_text",
|
||||
SnapshotJson: "snapshot_json",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewFinanceReviewDao creates and returns a new DAO object for table data access.
|
||||
func NewFinanceReviewDao(handlers ...gdb.ModelHandler) *FinanceReviewDao {
|
||||
return &FinanceReviewDao{
|
||||
group: "default",
|
||||
table: "hg_finance_review",
|
||||
columns: financeReviewColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *FinanceReviewDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *FinanceReviewDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *FinanceReviewDao) Columns() FinanceReviewColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *FinanceReviewDao) 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 *FinanceReviewDao) 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 *FinanceReviewDao) 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"
|
||||
)
|
||||
|
||||
// IdempotencyRecordDao is the data access object for the table hg_idempotency_record.
|
||||
type IdempotencyRecordDao 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 IdempotencyRecordColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// IdempotencyRecordColumns defines and stores column names for the table hg_idempotency_record.
|
||||
type IdempotencyRecordColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
Scope string // 业务作用域
|
||||
IdempotencyKey string // 幂等键
|
||||
RequestDigest string // 请求摘要
|
||||
ResourceType string // 资源类型
|
||||
ResourceId string // 资源ID
|
||||
ProcessStatus string // 处理状态
|
||||
ResponseCode string // 响应码
|
||||
ResponseDigest string // 响应摘要
|
||||
ExpireAt string // 过期时间
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// idempotencyRecordColumns holds the columns for the table hg_idempotency_record.
|
||||
var idempotencyRecordColumns = IdempotencyRecordColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
Scope: "scope",
|
||||
IdempotencyKey: "idempotency_key",
|
||||
RequestDigest: "request_digest",
|
||||
ResourceType: "resource_type",
|
||||
ResourceId: "resource_id",
|
||||
ProcessStatus: "process_status",
|
||||
ResponseCode: "response_code",
|
||||
ResponseDigest: "response_digest",
|
||||
ExpireAt: "expire_at",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewIdempotencyRecordDao creates and returns a new DAO object for table data access.
|
||||
func NewIdempotencyRecordDao(handlers ...gdb.ModelHandler) *IdempotencyRecordDao {
|
||||
return &IdempotencyRecordDao{
|
||||
group: "default",
|
||||
table: "hg_idempotency_record",
|
||||
columns: idempotencyRecordColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *IdempotencyRecordDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *IdempotencyRecordDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *IdempotencyRecordDao) Columns() IdempotencyRecordColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *IdempotencyRecordDao) 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 *IdempotencyRecordDao) 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 *IdempotencyRecordDao) 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"
|
||||
)
|
||||
|
||||
// OutboxEventDao is the data access object for the table hg_outbox_event.
|
||||
type OutboxEventDao 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 OutboxEventColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// OutboxEventColumns defines and stores column names for the table hg_outbox_event.
|
||||
type OutboxEventColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
EventNo string // 事件号
|
||||
AggregateType string // 聚合根类型
|
||||
AggregateId string // 聚合根ID
|
||||
EventType string // 事件类型
|
||||
PayloadJson string // 已脱敏事件数据
|
||||
PublishStatus string // 发送状态
|
||||
RetryCount string // 重试次数
|
||||
NextRetryAt string // 下次重试时间
|
||||
LastError string // 最后错误
|
||||
CreatedAt string // 创建时间
|
||||
PublishedAt string // 发送时间
|
||||
}
|
||||
|
||||
// outboxEventColumns holds the columns for the table hg_outbox_event.
|
||||
var outboxEventColumns = OutboxEventColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
EventNo: "event_no",
|
||||
AggregateType: "aggregate_type",
|
||||
AggregateId: "aggregate_id",
|
||||
EventType: "event_type",
|
||||
PayloadJson: "payload_json",
|
||||
PublishStatus: "publish_status",
|
||||
RetryCount: "retry_count",
|
||||
NextRetryAt: "next_retry_at",
|
||||
LastError: "last_error",
|
||||
CreatedAt: "created_at",
|
||||
PublishedAt: "published_at",
|
||||
}
|
||||
|
||||
// NewOutboxEventDao creates and returns a new DAO object for table data access.
|
||||
func NewOutboxEventDao(handlers ...gdb.ModelHandler) *OutboxEventDao {
|
||||
return &OutboxEventDao{
|
||||
group: "default",
|
||||
table: "hg_outbox_event",
|
||||
columns: outboxEventColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *OutboxEventDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *OutboxEventDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *OutboxEventDao) Columns() OutboxEventColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *OutboxEventDao) 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 *OutboxEventDao) 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 *OutboxEventDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+137
@@ -0,0 +1,137 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// PayLogDao is the data access object for the table hg_pay_log.
|
||||
type PayLogDao 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 PayLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// PayLogColumns defines and stores column names for the table hg_pay_log.
|
||||
type PayLogColumns struct {
|
||||
Id string // 主键
|
||||
MemberId string // 会员ID
|
||||
AppId string // 应用ID
|
||||
AddonsName string // 插件名称
|
||||
OrderSn string // 关联订单号
|
||||
OrderGroup string // 组别[默认统一支付类型]
|
||||
Openid string // openid
|
||||
MchId string // 商户支付账户
|
||||
Subject string // 订单标题
|
||||
Detail string // 支付商品详情
|
||||
AuthCode string // 刷卡码
|
||||
OutTradeNo string // 商户订单号
|
||||
TransactionId string // 交易号
|
||||
PayType string // 支付类型
|
||||
PayAmount string // 支付金额
|
||||
ActualAmount string // 实付金额
|
||||
PayStatus string // 支付状态
|
||||
PayAt string // 支付时间
|
||||
TradeType string // 交易类型
|
||||
RefundSn string // 退款单号
|
||||
IsRefund string // 是否退款
|
||||
Custom string // 自定义参数
|
||||
CreateIp string // 创建者IP
|
||||
PayIp string // 支付者IP
|
||||
NotifyUrl string // 支付通知回调地址
|
||||
ReturnUrl string // 买家付款成功跳转地址
|
||||
TraceIds string // 链路ID集合
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// payLogColumns holds the columns for the table hg_pay_log.
|
||||
var payLogColumns = PayLogColumns{
|
||||
Id: "id",
|
||||
MemberId: "member_id",
|
||||
AppId: "app_id",
|
||||
AddonsName: "addons_name",
|
||||
OrderSn: "order_sn",
|
||||
OrderGroup: "order_group",
|
||||
Openid: "openid",
|
||||
MchId: "mch_id",
|
||||
Subject: "subject",
|
||||
Detail: "detail",
|
||||
AuthCode: "auth_code",
|
||||
OutTradeNo: "out_trade_no",
|
||||
TransactionId: "transaction_id",
|
||||
PayType: "pay_type",
|
||||
PayAmount: "pay_amount",
|
||||
ActualAmount: "actual_amount",
|
||||
PayStatus: "pay_status",
|
||||
PayAt: "pay_at",
|
||||
TradeType: "trade_type",
|
||||
RefundSn: "refund_sn",
|
||||
IsRefund: "is_refund",
|
||||
Custom: "custom",
|
||||
CreateIp: "create_ip",
|
||||
PayIp: "pay_ip",
|
||||
NotifyUrl: "notify_url",
|
||||
ReturnUrl: "return_url",
|
||||
TraceIds: "trace_ids",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewPayLogDao creates and returns a new DAO object for table data access.
|
||||
func NewPayLogDao(handlers ...gdb.ModelHandler) *PayLogDao {
|
||||
return &PayLogDao{
|
||||
group: "default",
|
||||
table: "hg_pay_log",
|
||||
columns: payLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *PayLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *PayLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *PayLogDao) Columns() PayLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *PayLogDao) 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 *PayLogDao) 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 *PayLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+103
@@ -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"
|
||||
)
|
||||
|
||||
// PayRefundDao is the data access object for the table hg_pay_refund.
|
||||
type PayRefundDao 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 PayRefundColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// PayRefundColumns defines and stores column names for the table hg_pay_refund.
|
||||
type PayRefundColumns struct {
|
||||
Id string // 主键ID
|
||||
MemberId string // 会员ID
|
||||
AppId string // 应用ID
|
||||
OrderSn string // 业务订单号
|
||||
RefundTradeNo string // 退款交易号
|
||||
RefundMoney string // 退款金额
|
||||
RefundWay string // 退款方式
|
||||
Ip string // 申请者IP
|
||||
Reason string // 申请退款原因
|
||||
Remark string // 退款备注
|
||||
Status string // 退款状态
|
||||
CreatedAt string // 申请时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// payRefundColumns holds the columns for the table hg_pay_refund.
|
||||
var payRefundColumns = PayRefundColumns{
|
||||
Id: "id",
|
||||
MemberId: "member_id",
|
||||
AppId: "app_id",
|
||||
OrderSn: "order_sn",
|
||||
RefundTradeNo: "refund_trade_no",
|
||||
RefundMoney: "refund_money",
|
||||
RefundWay: "refund_way",
|
||||
Ip: "ip",
|
||||
Reason: "reason",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewPayRefundDao creates and returns a new DAO object for table data access.
|
||||
func NewPayRefundDao(handlers ...gdb.ModelHandler) *PayRefundDao {
|
||||
return &PayRefundDao{
|
||||
group: "default",
|
||||
table: "hg_pay_refund",
|
||||
columns: payRefundColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *PayRefundDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *PayRefundDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *PayRefundDao) Columns() PayRefundColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *PayRefundDao) 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 *PayRefundDao) 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 *PayRefundDao) 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"
|
||||
)
|
||||
|
||||
// PaymentChannelDao is the data access object for the table hg_payment_channel.
|
||||
type PaymentChannelDao 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 PaymentChannelColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// PaymentChannelColumns defines and stores column names for the table hg_payment_channel.
|
||||
type PaymentChannelColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ChannelCode string // 渠道编码
|
||||
Name string // 渠道名称
|
||||
ChannelType string // 渠道类型
|
||||
Direction string // 支持方向
|
||||
ConfigCipher string // 渠道配置密文
|
||||
MinAmount string // 最小金额(分)
|
||||
MaxAmount string // 最大金额(分)
|
||||
FeeType string // 手续费类型
|
||||
FeeFixedAmount string // 固定手续费(分)
|
||||
FeeRate string // 费率(万分比)
|
||||
Status string // 状态
|
||||
Sort string // 排序
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// paymentChannelColumns holds the columns for the table hg_payment_channel.
|
||||
var paymentChannelColumns = PaymentChannelColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ChannelCode: "channel_code",
|
||||
Name: "name",
|
||||
ChannelType: "channel_type",
|
||||
Direction: "direction",
|
||||
ConfigCipher: "config_cipher",
|
||||
MinAmount: "min_amount",
|
||||
MaxAmount: "max_amount",
|
||||
FeeType: "fee_type",
|
||||
FeeFixedAmount: "fee_fixed_amount",
|
||||
FeeRate: "fee_rate",
|
||||
Status: "status",
|
||||
Sort: "sort",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewPaymentChannelDao creates and returns a new DAO object for table data access.
|
||||
func NewPaymentChannelDao(handlers ...gdb.ModelHandler) *PaymentChannelDao {
|
||||
return &PaymentChannelDao{
|
||||
group: "default",
|
||||
table: "hg_payment_channel",
|
||||
columns: paymentChannelColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *PaymentChannelDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *PaymentChannelDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *PaymentChannelDao) Columns() PaymentChannelColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *PaymentChannelDao) 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 *PaymentChannelDao) 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 *PaymentChannelDao) 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,129 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ProductDao is the data access object for the table hg_product.
|
||||
type ProductDao 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 ProductColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// ProductColumns defines and stores column names for the table hg_product.
|
||||
type ProductColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ProductNo string // 商品编号
|
||||
CategoryId string // 分类ID
|
||||
ProductType string // 商品类型
|
||||
PaymentType string // 支付方式
|
||||
Name string // 商品名称
|
||||
ShopName string // 店铺名称
|
||||
PriceAmount string // 单价(分)
|
||||
Currency string // 币种
|
||||
CoverAttachmentId string // 封面附件ID
|
||||
CoverUrl string // 封面URL
|
||||
DetailHtml string // 商品详情
|
||||
IsRecommended string // 是否推荐
|
||||
PublishStatus string // 发布状态
|
||||
StartAt string // 展示开始时间
|
||||
EndAt string // 展示结束时间
|
||||
Sort string // 排序
|
||||
Version string // 乐观锁
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// productColumns holds the columns for the table hg_product.
|
||||
var productColumns = ProductColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ProductNo: "product_no",
|
||||
CategoryId: "category_id",
|
||||
ProductType: "product_type",
|
||||
PaymentType: "payment_type",
|
||||
Name: "name",
|
||||
ShopName: "shop_name",
|
||||
PriceAmount: "price_amount",
|
||||
Currency: "currency",
|
||||
CoverAttachmentId: "cover_attachment_id",
|
||||
CoverUrl: "cover_url",
|
||||
DetailHtml: "detail_html",
|
||||
IsRecommended: "is_recommended",
|
||||
PublishStatus: "publish_status",
|
||||
StartAt: "start_at",
|
||||
EndAt: "end_at",
|
||||
Sort: "sort",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewProductDao creates and returns a new DAO object for table data access.
|
||||
func NewProductDao(handlers ...gdb.ModelHandler) *ProductDao {
|
||||
return &ProductDao{
|
||||
group: "default",
|
||||
table: "hg_product",
|
||||
columns: productColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *ProductDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *ProductDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *ProductDao) Columns() ProductColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *ProductDao) 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 *ProductDao) 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 *ProductDao) 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,107 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ProductCategoryDao is the data access object for the table hg_product_category.
|
||||
type ProductCategoryDao 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 ProductCategoryColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// ProductCategoryColumns defines and stores column names for the table hg_product_category.
|
||||
type ProductCategoryColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
Pid string // 上级ID
|
||||
Level string // 树等级
|
||||
Tree string // 关系树
|
||||
CategoryCode string // 分类编码
|
||||
Name string // 分类名称
|
||||
Status string // 状态
|
||||
Sort string // 排序
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// productCategoryColumns holds the columns for the table hg_product_category.
|
||||
var productCategoryColumns = ProductCategoryColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
Pid: "pid",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
CategoryCode: "category_code",
|
||||
Name: "name",
|
||||
Status: "status",
|
||||
Sort: "sort",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewProductCategoryDao creates and returns a new DAO object for table data access.
|
||||
func NewProductCategoryDao(handlers ...gdb.ModelHandler) *ProductCategoryDao {
|
||||
return &ProductCategoryDao{
|
||||
group: "default",
|
||||
table: "hg_product_category",
|
||||
columns: productCategoryColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *ProductCategoryDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *ProductCategoryDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *ProductCategoryDao) Columns() ProductCategoryColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *ProductCategoryDao) 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 *ProductCategoryDao) 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 *ProductCategoryDao) 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,125 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// RechargeOrderDao is the data access object for the table hg_recharge_order.
|
||||
type RechargeOrderDao 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 RechargeOrderColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// RechargeOrderColumns defines and stores column names for the table hg_recharge_order.
|
||||
type RechargeOrderColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
RechargeNo string // 充值单号
|
||||
MemberId string // 会员ID
|
||||
ChannelId string // 支付渠道ID
|
||||
RequestAmount string // 申请金额(分)
|
||||
PaidAmount string // 实付金额(分)
|
||||
Currency string // 币种
|
||||
ExternalNo string // 外部支付单号
|
||||
VoucherAttachmentIds string // 打款凭证附件
|
||||
RechargeType string // 充值类型
|
||||
RechargeStatus string // 充值状态
|
||||
Remark string // 会员备注
|
||||
ReviewReasonCode string // 审核原因编码
|
||||
ReviewReason string // 审核意见
|
||||
ApprovalRequestId string // 审批单ID
|
||||
LedgerId string // 入账台账ID
|
||||
PaidAt string // 支付时间
|
||||
ReviewedAt string // 审核时间
|
||||
CreditedAt string // 入账时间
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// rechargeOrderColumns holds the columns for the table hg_recharge_order.
|
||||
var rechargeOrderColumns = RechargeOrderColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
RechargeNo: "recharge_no",
|
||||
MemberId: "member_id",
|
||||
ChannelId: "channel_id",
|
||||
RequestAmount: "request_amount",
|
||||
PaidAmount: "paid_amount",
|
||||
Currency: "currency",
|
||||
ExternalNo: "external_no",
|
||||
VoucherAttachmentIds: "voucher_attachment_ids",
|
||||
RechargeType: "recharge_type",
|
||||
RechargeStatus: "recharge_status",
|
||||
Remark: "remark",
|
||||
ReviewReasonCode: "review_reason_code",
|
||||
ReviewReason: "review_reason",
|
||||
ApprovalRequestId: "approval_request_id",
|
||||
LedgerId: "ledger_id",
|
||||
PaidAt: "paid_at",
|
||||
ReviewedAt: "reviewed_at",
|
||||
CreditedAt: "credited_at",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewRechargeOrderDao creates and returns a new DAO object for table data access.
|
||||
func NewRechargeOrderDao(handlers ...gdb.ModelHandler) *RechargeOrderDao {
|
||||
return &RechargeOrderDao{
|
||||
group: "default",
|
||||
table: "hg_recharge_order",
|
||||
columns: rechargeOrderColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *RechargeOrderDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *RechargeOrderDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *RechargeOrderDao) Columns() RechargeOrderColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *RechargeOrderDao) 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 *RechargeOrderDao) 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 *RechargeOrderDao) 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"
|
||||
)
|
||||
|
||||
// SensitiveAccessLogDao is the data access object for the table hg_sensitive_access_log.
|
||||
type SensitiveAccessLogDao 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 SensitiveAccessLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SensitiveAccessLogColumns defines and stores column names for the table hg_sensitive_access_log.
|
||||
type SensitiveAccessLogColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
AccessNo string // 查看流水号
|
||||
ActorId string // 管理员ID
|
||||
TargetType string // 目标类型
|
||||
TargetId string // 目标ID
|
||||
FieldSet string // 查看字段集
|
||||
PurposeCode string // 用途编码
|
||||
PurposeText string // 用途说明
|
||||
AuthorizationNo string // 授权号
|
||||
MfaVerified string // 是否二次认证
|
||||
Result string // 查看结果
|
||||
TraceId string // 链路ID
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
// sensitiveAccessLogColumns holds the columns for the table hg_sensitive_access_log.
|
||||
var sensitiveAccessLogColumns = SensitiveAccessLogColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
AccessNo: "access_no",
|
||||
ActorId: "actor_id",
|
||||
TargetType: "target_type",
|
||||
TargetId: "target_id",
|
||||
FieldSet: "field_set",
|
||||
PurposeCode: "purpose_code",
|
||||
PurposeText: "purpose_text",
|
||||
AuthorizationNo: "authorization_no",
|
||||
MfaVerified: "mfa_verified",
|
||||
Result: "result",
|
||||
TraceId: "trace_id",
|
||||
CreatedAt: "created_at",
|
||||
}
|
||||
|
||||
// NewSensitiveAccessLogDao creates and returns a new DAO object for table data access.
|
||||
func NewSensitiveAccessLogDao(handlers ...gdb.ModelHandler) *SensitiveAccessLogDao {
|
||||
return &SensitiveAccessLogDao{
|
||||
group: "default",
|
||||
table: "hg_sensitive_access_log",
|
||||
columns: sensitiveAccessLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SensitiveAccessLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SensitiveAccessLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SensitiveAccessLogDao) Columns() SensitiveAccessLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SensitiveAccessLogDao) 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 *SensitiveAccessLogDao) 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 *SensitiveAccessLogDao) 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,113 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SiteConfigVersionDao is the data access object for the table hg_site_config_version.
|
||||
type SiteConfigVersionDao 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 SiteConfigVersionColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SiteConfigVersionColumns defines and stores column names for the table hg_site_config_version.
|
||||
type SiteConfigVersionColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
ConfigNo string // 配置版本号
|
||||
ConfigGroup string // 配置组
|
||||
SchemaVersion string // Schema版本
|
||||
ConfigJson string // 完整配置快照
|
||||
ConfigDigest string // 配置摘要
|
||||
PublishStatus string // 发布状态
|
||||
EffectiveAt string // 计划生效时间
|
||||
PublishedAt string // 实际发布时间
|
||||
ApprovalRequestId string // 审批单ID
|
||||
BaseVersionId string // 基础版本ID
|
||||
Version string // 乐观锁
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// siteConfigVersionColumns holds the columns for the table hg_site_config_version.
|
||||
var siteConfigVersionColumns = SiteConfigVersionColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
ConfigNo: "config_no",
|
||||
ConfigGroup: "config_group",
|
||||
SchemaVersion: "schema_version",
|
||||
ConfigJson: "config_json",
|
||||
ConfigDigest: "config_digest",
|
||||
PublishStatus: "publish_status",
|
||||
EffectiveAt: "effective_at",
|
||||
PublishedAt: "published_at",
|
||||
ApprovalRequestId: "approval_request_id",
|
||||
BaseVersionId: "base_version_id",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSiteConfigVersionDao creates and returns a new DAO object for table data access.
|
||||
func NewSiteConfigVersionDao(handlers ...gdb.ModelHandler) *SiteConfigVersionDao {
|
||||
return &SiteConfigVersionDao{
|
||||
group: "default",
|
||||
table: "hg_site_config_version",
|
||||
columns: siteConfigVersionColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SiteConfigVersionDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SiteConfigVersionDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SiteConfigVersionDao) Columns() SiteConfigVersionColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SiteConfigVersionDao) 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 *SiteConfigVersionDao) 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 *SiteConfigVersionDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+105
@@ -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"
|
||||
)
|
||||
|
||||
// SysAddonsConfigDao is the data access object for the table hg_sys_addons_config.
|
||||
type SysAddonsConfigDao 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 SysAddonsConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysAddonsConfigColumns defines and stores column names for the table hg_sys_addons_config.
|
||||
type SysAddonsConfigColumns struct {
|
||||
Id string // 配置ID
|
||||
AddonName string // 插件名称
|
||||
Group string // 分组
|
||||
Name string // 参数名称
|
||||
Type string // 键值类型:string,int,uint,bool,datetime,date
|
||||
Key string // 参数键名
|
||||
Value string // 参数键值
|
||||
DefaultValue string // 默认值
|
||||
Sort string // 排序
|
||||
Tip string // 变量描述
|
||||
IsDefault string // 是否为系统默认
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysAddonsConfigColumns holds the columns for the table hg_sys_addons_config.
|
||||
var sysAddonsConfigColumns = SysAddonsConfigColumns{
|
||||
Id: "id",
|
||||
AddonName: "addon_name",
|
||||
Group: "group",
|
||||
Name: "name",
|
||||
Type: "type",
|
||||
Key: "key",
|
||||
Value: "value",
|
||||
DefaultValue: "default_value",
|
||||
Sort: "sort",
|
||||
Tip: "tip",
|
||||
IsDefault: "is_default",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysAddonsConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewSysAddonsConfigDao(handlers ...gdb.ModelHandler) *SysAddonsConfigDao {
|
||||
return &SysAddonsConfigDao{
|
||||
group: "default",
|
||||
table: "hg_sys_addons_config",
|
||||
columns: sysAddonsConfigColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysAddonsConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysAddonsConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysAddonsConfigDao) Columns() SysAddonsConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysAddonsConfigDao) 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 *SysAddonsConfigDao) 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 *SysAddonsConfigDao) 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,89 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysAddonsInstallDao is the data access object for the table hg_sys_addons_install.
|
||||
type SysAddonsInstallDao 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 SysAddonsInstallColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysAddonsInstallColumns defines and stores column names for the table hg_sys_addons_install.
|
||||
type SysAddonsInstallColumns struct {
|
||||
Id string // 主键
|
||||
Name string // 插件名称
|
||||
Version string // 版本号
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysAddonsInstallColumns holds the columns for the table hg_sys_addons_install.
|
||||
var sysAddonsInstallColumns = SysAddonsInstallColumns{
|
||||
Id: "id",
|
||||
Name: "name",
|
||||
Version: "version",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysAddonsInstallDao creates and returns a new DAO object for table data access.
|
||||
func NewSysAddonsInstallDao(handlers ...gdb.ModelHandler) *SysAddonsInstallDao {
|
||||
return &SysAddonsInstallDao{
|
||||
group: "default",
|
||||
table: "hg_sys_addons_install",
|
||||
columns: sysAddonsInstallColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysAddonsInstallDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysAddonsInstallDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysAddonsInstallDao) Columns() SysAddonsInstallColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysAddonsInstallDao) 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 *SysAddonsInstallDao) 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 *SysAddonsInstallDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysAttachmentDao is the data access object for the table hg_sys_attachment.
|
||||
type SysAttachmentDao 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 SysAttachmentColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysAttachmentColumns defines and stores column names for the table hg_sys_attachment.
|
||||
type SysAttachmentColumns struct {
|
||||
Id string // 文件ID
|
||||
AppId string // 应用ID
|
||||
MemberId string // 管理员ID
|
||||
CateId string // 上传分类
|
||||
Drive string // 上传驱动
|
||||
Name string // 文件原始名
|
||||
Kind string // 上传类型
|
||||
MimeType string // 扩展类型
|
||||
NaiveType string // NaiveUI类型
|
||||
Path string // 本地路径
|
||||
FileUrl string // url
|
||||
Size string // 文件大小
|
||||
Ext string // 扩展名
|
||||
Md5 string // md5校验码
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// sysAttachmentColumns holds the columns for the table hg_sys_attachment.
|
||||
var sysAttachmentColumns = SysAttachmentColumns{
|
||||
Id: "id",
|
||||
AppId: "app_id",
|
||||
MemberId: "member_id",
|
||||
CateId: "cate_id",
|
||||
Drive: "drive",
|
||||
Name: "name",
|
||||
Kind: "kind",
|
||||
MimeType: "mime_type",
|
||||
NaiveType: "naive_type",
|
||||
Path: "path",
|
||||
FileUrl: "file_url",
|
||||
Size: "size",
|
||||
Ext: "ext",
|
||||
Md5: "md5",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysAttachmentDao creates and returns a new DAO object for table data access.
|
||||
func NewSysAttachmentDao(handlers ...gdb.ModelHandler) *SysAttachmentDao {
|
||||
return &SysAttachmentDao{
|
||||
group: "default",
|
||||
table: "hg_sys_attachment",
|
||||
columns: sysAttachmentColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysAttachmentDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysAttachmentDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysAttachmentDao) Columns() SysAttachmentColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysAttachmentDao) 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 *SysAttachmentDao) 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 *SysAttachmentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysBlacklistDao is the data access object for the table hg_sys_blacklist.
|
||||
type SysBlacklistDao 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 SysBlacklistColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysBlacklistColumns defines and stores column names for the table hg_sys_blacklist.
|
||||
type SysBlacklistColumns struct {
|
||||
Id string // 黑名单ID
|
||||
Ip string // IP地址
|
||||
Remark string // 备注
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysBlacklistColumns holds the columns for the table hg_sys_blacklist.
|
||||
var sysBlacklistColumns = SysBlacklistColumns{
|
||||
Id: "id",
|
||||
Ip: "ip",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysBlacklistDao creates and returns a new DAO object for table data access.
|
||||
func NewSysBlacklistDao(handlers ...gdb.ModelHandler) *SysBlacklistDao {
|
||||
return &SysBlacklistDao{
|
||||
group: "default",
|
||||
table: "hg_sys_blacklist",
|
||||
columns: sysBlacklistColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysBlacklistDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysBlacklistDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysBlacklistDao) Columns() SysBlacklistColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysBlacklistDao) 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 *SysBlacklistDao) 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 *SysBlacklistDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+103
@@ -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"
|
||||
)
|
||||
|
||||
// SysConfigDao is the data access object for the table hg_sys_config.
|
||||
type SysConfigDao 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 SysConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysConfigColumns defines and stores column names for the table hg_sys_config.
|
||||
type SysConfigColumns struct {
|
||||
Id string // 配置ID
|
||||
Group string // 配置分组
|
||||
Name string // 参数名称
|
||||
Type string // 键值类型:string,int,uint,bool,datetime,date
|
||||
Key string // 参数键名
|
||||
Value string // 参数键值
|
||||
DefaultValue string // 默认值
|
||||
Sort string // 排序
|
||||
Tip string // 变量描述
|
||||
IsDefault string // 是否为系统默认
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysConfigColumns holds the columns for the table hg_sys_config.
|
||||
var sysConfigColumns = SysConfigColumns{
|
||||
Id: "id",
|
||||
Group: "group",
|
||||
Name: "name",
|
||||
Type: "type",
|
||||
Key: "key",
|
||||
Value: "value",
|
||||
DefaultValue: "default_value",
|
||||
Sort: "sort",
|
||||
Tip: "tip",
|
||||
IsDefault: "is_default",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewSysConfigDao(handlers ...gdb.ModelHandler) *SysConfigDao {
|
||||
return &SysConfigDao{
|
||||
group: "default",
|
||||
table: "hg_sys_config",
|
||||
columns: sysConfigColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysConfigDao) Columns() SysConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysConfigDao) 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 *SysConfigDao) 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 *SysConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+103
@@ -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"
|
||||
)
|
||||
|
||||
// SysCronDao is the data access object for the table hg_sys_cron.
|
||||
type SysCronDao 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 SysCronColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysCronColumns defines and stores column names for the table hg_sys_cron.
|
||||
type SysCronColumns struct {
|
||||
Id string // 任务ID
|
||||
GroupId string // 分组ID
|
||||
Title string // 任务标题
|
||||
Name string // 任务方法
|
||||
Params string // 函数参数
|
||||
Pattern string // 表达式
|
||||
Policy string // 策略
|
||||
Count string // 执行次数
|
||||
Sort string // 排序
|
||||
Remark string // 备注
|
||||
Status string // 任务状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysCronColumns holds the columns for the table hg_sys_cron.
|
||||
var sysCronColumns = SysCronColumns{
|
||||
Id: "id",
|
||||
GroupId: "group_id",
|
||||
Title: "title",
|
||||
Name: "name",
|
||||
Params: "params",
|
||||
Pattern: "pattern",
|
||||
Policy: "policy",
|
||||
Count: "count",
|
||||
Sort: "sort",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysCronDao creates and returns a new DAO object for table data access.
|
||||
func NewSysCronDao(handlers ...gdb.ModelHandler) *SysCronDao {
|
||||
return &SysCronDao{
|
||||
group: "default",
|
||||
table: "hg_sys_cron",
|
||||
columns: sysCronColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysCronDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysCronDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysCronDao) Columns() SysCronColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysCronDao) 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 *SysCronDao) 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 *SysCronDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysCronGroupDao is the data access object for the table hg_sys_cron_group.
|
||||
type SysCronGroupDao 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 SysCronGroupColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysCronGroupColumns defines and stores column names for the table hg_sys_cron_group.
|
||||
type SysCronGroupColumns struct {
|
||||
Id string // 任务分组ID
|
||||
Pid string // 父类任务分组ID
|
||||
Name string // 分组名称
|
||||
IsDefault string // 是否默认
|
||||
Sort string // 排序
|
||||
Remark string // 备注
|
||||
Status string // 分组状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysCronGroupColumns holds the columns for the table hg_sys_cron_group.
|
||||
var sysCronGroupColumns = SysCronGroupColumns{
|
||||
Id: "id",
|
||||
Pid: "pid",
|
||||
Name: "name",
|
||||
IsDefault: "is_default",
|
||||
Sort: "sort",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysCronGroupDao creates and returns a new DAO object for table data access.
|
||||
func NewSysCronGroupDao(handlers ...gdb.ModelHandler) *SysCronGroupDao {
|
||||
return &SysCronGroupDao{
|
||||
group: "default",
|
||||
table: "hg_sys_cron_group",
|
||||
columns: sysCronGroupColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysCronGroupDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysCronGroupDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysCronGroupDao) Columns() SysCronGroupColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysCronGroupDao) 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 *SysCronGroupDao) 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 *SysCronGroupDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysDictDataDao is the data access object for the table hg_sys_dict_data.
|
||||
type SysDictDataDao 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 SysDictDataColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysDictDataColumns defines and stores column names for the table hg_sys_dict_data.
|
||||
type SysDictDataColumns struct {
|
||||
Id string // 字典数据ID
|
||||
Label string // 字典标签
|
||||
Value string // 字典键值
|
||||
ValueType string // 键值数据类型:string,int,uint,bool,datetime,date
|
||||
Type string // 字典类型
|
||||
ListClass string // 表格回显样式
|
||||
IsDefault string // 是否为系统默认
|
||||
Sort string // 字典排序
|
||||
Remark string // 备注
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysDictDataColumns holds the columns for the table hg_sys_dict_data.
|
||||
var sysDictDataColumns = SysDictDataColumns{
|
||||
Id: "id",
|
||||
Label: "label",
|
||||
Value: "value",
|
||||
ValueType: "value_type",
|
||||
Type: "type",
|
||||
ListClass: "list_class",
|
||||
IsDefault: "is_default",
|
||||
Sort: "sort",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysDictDataDao creates and returns a new DAO object for table data access.
|
||||
func NewSysDictDataDao(handlers ...gdb.ModelHandler) *SysDictDataDao {
|
||||
return &SysDictDataDao{
|
||||
group: "default",
|
||||
table: "hg_sys_dict_data",
|
||||
columns: sysDictDataColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysDictDataDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysDictDataDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysDictDataDao) Columns() SysDictDataColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysDictDataDao) 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 *SysDictDataDao) 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 *SysDictDataDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysDictTypeDao is the data access object for the table hg_sys_dict_type.
|
||||
type SysDictTypeDao 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 SysDictTypeColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysDictTypeColumns defines and stores column names for the table hg_sys_dict_type.
|
||||
type SysDictTypeColumns struct {
|
||||
Id string // 字典类型ID
|
||||
Pid string // 父类字典类型ID
|
||||
Name string // 字典类型名称
|
||||
Type string // 字典类型
|
||||
Sort string // 排序
|
||||
Remark string // 备注
|
||||
Status string // 字典类型状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysDictTypeColumns holds the columns for the table hg_sys_dict_type.
|
||||
var sysDictTypeColumns = SysDictTypeColumns{
|
||||
Id: "id",
|
||||
Pid: "pid",
|
||||
Name: "name",
|
||||
Type: "type",
|
||||
Sort: "sort",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysDictTypeDao creates and returns a new DAO object for table data access.
|
||||
func NewSysDictTypeDao(handlers ...gdb.ModelHandler) *SysDictTypeDao {
|
||||
return &SysDictTypeDao{
|
||||
group: "default",
|
||||
table: "hg_sys_dict_type",
|
||||
columns: sysDictTypeColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysDictTypeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysDictTypeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysDictTypeDao) Columns() SysDictTypeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysDictTypeDao) 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 *SysDictTypeDao) 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 *SysDictTypeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+97
@@ -0,0 +1,97 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysEmsLogDao is the data access object for the table hg_sys_ems_log.
|
||||
type SysEmsLogDao 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 SysEmsLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysEmsLogColumns defines and stores column names for the table hg_sys_ems_log.
|
||||
type SysEmsLogColumns struct {
|
||||
Id string // 主键
|
||||
Event string // 事件
|
||||
Email string // 邮箱地址,多个用;隔开
|
||||
Code string // 验证码
|
||||
Times string // 验证次数
|
||||
Content string // 邮件内容
|
||||
Ip string // ip地址
|
||||
Status string // 状态(1未验证,2已验证)
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysEmsLogColumns holds the columns for the table hg_sys_ems_log.
|
||||
var sysEmsLogColumns = SysEmsLogColumns{
|
||||
Id: "id",
|
||||
Event: "event",
|
||||
Email: "email",
|
||||
Code: "code",
|
||||
Times: "times",
|
||||
Content: "content",
|
||||
Ip: "ip",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysEmsLogDao creates and returns a new DAO object for table data access.
|
||||
func NewSysEmsLogDao(handlers ...gdb.ModelHandler) *SysEmsLogDao {
|
||||
return &SysEmsLogDao{
|
||||
group: "default",
|
||||
table: "hg_sys_ems_log",
|
||||
columns: sysEmsLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysEmsLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysEmsLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysEmsLogDao) Columns() SysEmsLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysEmsLogDao) 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 *SysEmsLogDao) 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 *SysEmsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+105
@@ -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"
|
||||
)
|
||||
|
||||
// SysGenCodesDao is the data access object for the table hg_sys_gen_codes.
|
||||
type SysGenCodesDao 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 SysGenCodesColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysGenCodesColumns defines and stores column names for the table hg_sys_gen_codes.
|
||||
type SysGenCodesColumns struct {
|
||||
Id string // 生成ID
|
||||
GenType string // 生成类型
|
||||
GenTemplate string // 生成模板
|
||||
VarName string // 实体命名
|
||||
Options string // 配置选项
|
||||
DbName string // 数据库名称
|
||||
TableName string // 主表名称
|
||||
TableComment string // 主表注释
|
||||
DaoName string // 主表dao模型
|
||||
MasterColumns string // 主表字段
|
||||
AddonName string // 插件名称
|
||||
Status string // 生成状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysGenCodesColumns holds the columns for the table hg_sys_gen_codes.
|
||||
var sysGenCodesColumns = SysGenCodesColumns{
|
||||
Id: "id",
|
||||
GenType: "gen_type",
|
||||
GenTemplate: "gen_template",
|
||||
VarName: "var_name",
|
||||
Options: "options",
|
||||
DbName: "db_name",
|
||||
TableName: "table_name",
|
||||
TableComment: "table_comment",
|
||||
DaoName: "dao_name",
|
||||
MasterColumns: "master_columns",
|
||||
AddonName: "addon_name",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysGenCodesDao creates and returns a new DAO object for table data access.
|
||||
func NewSysGenCodesDao(handlers ...gdb.ModelHandler) *SysGenCodesDao {
|
||||
return &SysGenCodesDao{
|
||||
group: "default",
|
||||
table: "hg_sys_gen_codes",
|
||||
columns: sysGenCodesColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysGenCodesDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysGenCodesDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysGenCodesDao) Columns() SysGenCodesColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysGenCodesDao) 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 *SysGenCodesDao) 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 *SysGenCodesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysGenCurdDemoDao is the data access object for the table hg_sys_gen_curd_demo.
|
||||
type SysGenCurdDemoDao 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 SysGenCurdDemoColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysGenCurdDemoColumns defines and stores column names for the table hg_sys_gen_curd_demo.
|
||||
type SysGenCurdDemoColumns struct {
|
||||
Id string // ID
|
||||
CategoryId string // 分类ID
|
||||
Title string // 标题
|
||||
Description string // 描述
|
||||
Content string // 内容
|
||||
Image string // 单图
|
||||
Attachfile string // 附件
|
||||
CityId string // 所在城市
|
||||
Switch string // 显示开关
|
||||
Sort string // 排序
|
||||
Status string // 状态
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysGenCurdDemoColumns holds the columns for the table hg_sys_gen_curd_demo.
|
||||
var sysGenCurdDemoColumns = SysGenCurdDemoColumns{
|
||||
Id: "id",
|
||||
CategoryId: "category_id",
|
||||
Title: "title",
|
||||
Description: "description",
|
||||
Content: "content",
|
||||
Image: "image",
|
||||
Attachfile: "attachfile",
|
||||
CityId: "city_id",
|
||||
Switch: "switch",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysGenCurdDemoDao creates and returns a new DAO object for table data access.
|
||||
func NewSysGenCurdDemoDao(handlers ...gdb.ModelHandler) *SysGenCurdDemoDao {
|
||||
return &SysGenCurdDemoDao{
|
||||
group: "default",
|
||||
table: "hg_sys_gen_curd_demo",
|
||||
columns: sysGenCurdDemoColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysGenCurdDemoDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysGenCurdDemoDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysGenCurdDemoDao) Columns() SysGenCurdDemoColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysGenCurdDemoDao) 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 *SysGenCurdDemoDao) 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 *SysGenCurdDemoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+105
@@ -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"
|
||||
)
|
||||
|
||||
// SysGenTreeDemoDao is the data access object for the table hg_sys_gen_tree_demo.
|
||||
type SysGenTreeDemoDao 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 SysGenTreeDemoColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysGenTreeDemoColumns defines and stores column names for the table hg_sys_gen_tree_demo.
|
||||
type SysGenTreeDemoColumns struct {
|
||||
Id string // ID
|
||||
Pid string // 上级ID
|
||||
Level string // 关系树级别
|
||||
Tree string // 关系树
|
||||
CategoryId string // 分类ID
|
||||
Title string // 标题
|
||||
Description string // 描述
|
||||
Sort string // 排序
|
||||
Status string // 状态
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// sysGenTreeDemoColumns holds the columns for the table hg_sys_gen_tree_demo.
|
||||
var sysGenTreeDemoColumns = SysGenTreeDemoColumns{
|
||||
Id: "id",
|
||||
Pid: "pid",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
CategoryId: "category_id",
|
||||
Title: "title",
|
||||
Description: "description",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewSysGenTreeDemoDao creates and returns a new DAO object for table data access.
|
||||
func NewSysGenTreeDemoDao(handlers ...gdb.ModelHandler) *SysGenTreeDemoDao {
|
||||
return &SysGenTreeDemoDao{
|
||||
group: "default",
|
||||
table: "hg_sys_gen_tree_demo",
|
||||
columns: sysGenTreeDemoColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysGenTreeDemoDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysGenTreeDemoDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysGenTreeDemoDao) Columns() SysGenTreeDemoColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysGenTreeDemoDao) 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 *SysGenTreeDemoDao) 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 *SysGenTreeDemoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+123
@@ -0,0 +1,123 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysLogDao is the data access object for the table hg_sys_log.
|
||||
type SysLogDao 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 SysLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysLogColumns defines and stores column names for the table hg_sys_log.
|
||||
type SysLogColumns struct {
|
||||
Id string // 日志ID
|
||||
ReqId string // 对外ID
|
||||
AppId string // 应用ID
|
||||
MerchantId string // 商户ID
|
||||
MemberId string // 用户ID
|
||||
Method string // 提交类型
|
||||
Module string // 访问模块
|
||||
Url string // 提交url
|
||||
GetData string // get数据
|
||||
PostData string // post数据
|
||||
HeaderData string // header数据
|
||||
Ip string // IP地址
|
||||
ProvinceId string // 省编码
|
||||
CityId string // 市编码
|
||||
ErrorCode string // 报错code
|
||||
ErrorMsg string // 对外错误提示
|
||||
ErrorData string // 报错日志
|
||||
UserAgent string // UA信息
|
||||
TakeUpTime string // 请求耗时
|
||||
Timestamp string // 响应时间
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// sysLogColumns holds the columns for the table hg_sys_log.
|
||||
var sysLogColumns = SysLogColumns{
|
||||
Id: "id",
|
||||
ReqId: "req_id",
|
||||
AppId: "app_id",
|
||||
MerchantId: "merchant_id",
|
||||
MemberId: "member_id",
|
||||
Method: "method",
|
||||
Module: "module",
|
||||
Url: "url",
|
||||
GetData: "get_data",
|
||||
PostData: "post_data",
|
||||
HeaderData: "header_data",
|
||||
Ip: "ip",
|
||||
ProvinceId: "province_id",
|
||||
CityId: "city_id",
|
||||
ErrorCode: "error_code",
|
||||
ErrorMsg: "error_msg",
|
||||
ErrorData: "error_data",
|
||||
UserAgent: "user_agent",
|
||||
TakeUpTime: "take_up_time",
|
||||
Timestamp: "timestamp",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysLogDao creates and returns a new DAO object for table data access.
|
||||
func NewSysLogDao(handlers ...gdb.ModelHandler) *SysLogDao {
|
||||
return &SysLogDao{
|
||||
group: "default",
|
||||
table: "hg_sys_log",
|
||||
columns: sysLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysLogDao) Columns() SysLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysLogDao) 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 *SysLogDao) 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 *SysLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+105
@@ -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"
|
||||
)
|
||||
|
||||
// SysLoginLogDao is the data access object for the table hg_sys_login_log.
|
||||
type SysLoginLogDao 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 SysLoginLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysLoginLogColumns defines and stores column names for the table hg_sys_login_log.
|
||||
type SysLoginLogColumns struct {
|
||||
Id string // 日志ID
|
||||
ReqId string // 请求ID
|
||||
MemberId string // 用户ID
|
||||
Username string // 用户名
|
||||
Response string // 响应数据
|
||||
LoginAt string // 登录时间
|
||||
LoginIp string // 登录IP
|
||||
ProvinceId string // 省编码
|
||||
CityId string // 市编码
|
||||
UserAgent string // UA信息
|
||||
ErrMsg string // 错误提示
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// sysLoginLogColumns holds the columns for the table hg_sys_login_log.
|
||||
var sysLoginLogColumns = SysLoginLogColumns{
|
||||
Id: "id",
|
||||
ReqId: "req_id",
|
||||
MemberId: "member_id",
|
||||
Username: "username",
|
||||
Response: "response",
|
||||
LoginAt: "login_at",
|
||||
LoginIp: "login_ip",
|
||||
ProvinceId: "province_id",
|
||||
CityId: "city_id",
|
||||
UserAgent: "user_agent",
|
||||
ErrMsg: "err_msg",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysLoginLogDao creates and returns a new DAO object for table data access.
|
||||
func NewSysLoginLogDao(handlers ...gdb.ModelHandler) *SysLoginLogDao {
|
||||
return &SysLoginLogDao{
|
||||
group: "default",
|
||||
table: "hg_sys_login_log",
|
||||
columns: sysLoginLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysLoginLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysLoginLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysLoginLogDao) Columns() SysLoginLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysLoginLogDao) 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 *SysLoginLogDao) 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 *SysLoginLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysProvincesDao is the data access object for the table hg_sys_provinces.
|
||||
type SysProvincesDao 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 SysProvincesColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysProvincesColumns defines and stores column names for the table hg_sys_provinces.
|
||||
type SysProvincesColumns struct {
|
||||
Id string // 省市区ID
|
||||
Title string // 栏目名称
|
||||
Pinyin string // 拼音
|
||||
Lng string // 经度
|
||||
Lat string // 纬度
|
||||
Pid string // 父栏目
|
||||
Level string // 关系树等级
|
||||
Tree string // 关系树
|
||||
Sort string // 排序
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysProvincesColumns holds the columns for the table hg_sys_provinces.
|
||||
var sysProvincesColumns = SysProvincesColumns{
|
||||
Id: "id",
|
||||
Title: "title",
|
||||
Pinyin: "pinyin",
|
||||
Lng: "lng",
|
||||
Lat: "lat",
|
||||
Pid: "pid",
|
||||
Level: "level",
|
||||
Tree: "tree",
|
||||
Sort: "sort",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysProvincesDao creates and returns a new DAO object for table data access.
|
||||
func NewSysProvincesDao(handlers ...gdb.ModelHandler) *SysProvincesDao {
|
||||
return &SysProvincesDao{
|
||||
group: "default",
|
||||
table: "hg_sys_provinces",
|
||||
columns: sysProvincesColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysProvincesDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysProvincesDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysProvincesDao) Columns() SysProvincesColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysProvincesDao) 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 *SysProvincesDao) 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 *SysProvincesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysServeLicenseDao is the data access object for the table hg_sys_serve_license.
|
||||
type SysServeLicenseDao 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 SysServeLicenseColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysServeLicenseColumns defines and stores column names for the table hg_sys_serve_license.
|
||||
type SysServeLicenseColumns struct {
|
||||
Id string // 许可ID
|
||||
Group string // 分组
|
||||
Name string // 许可名称
|
||||
Appid string // 应用ID
|
||||
SecretKey string // 应用秘钥
|
||||
RemoteAddr string // 最后连接地址
|
||||
OnlineLimit string // 在线限制
|
||||
LoginTimes string // 登录次数
|
||||
LastLoginAt string // 最后登录时间
|
||||
LastActiveAt string // 最后心跳
|
||||
Routes string // 路由表,空使用默认分组路由
|
||||
AllowedIps string // IP白名单
|
||||
EndAt string // 授权有效期
|
||||
Remark string // 备注
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// sysServeLicenseColumns holds the columns for the table hg_sys_serve_license.
|
||||
var sysServeLicenseColumns = SysServeLicenseColumns{
|
||||
Id: "id",
|
||||
Group: "group",
|
||||
Name: "name",
|
||||
Appid: "appid",
|
||||
SecretKey: "secret_key",
|
||||
RemoteAddr: "remote_addr",
|
||||
OnlineLimit: "online_limit",
|
||||
LoginTimes: "login_times",
|
||||
LastLoginAt: "last_login_at",
|
||||
LastActiveAt: "last_active_at",
|
||||
Routes: "routes",
|
||||
AllowedIps: "allowed_ips",
|
||||
EndAt: "end_at",
|
||||
Remark: "remark",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysServeLicenseDao creates and returns a new DAO object for table data access.
|
||||
func NewSysServeLicenseDao(handlers ...gdb.ModelHandler) *SysServeLicenseDao {
|
||||
return &SysServeLicenseDao{
|
||||
group: "default",
|
||||
table: "hg_sys_serve_license",
|
||||
columns: sysServeLicenseColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysServeLicenseDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysServeLicenseDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysServeLicenseDao) Columns() SysServeLicenseColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysServeLicenseDao) 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 *SysServeLicenseDao) 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 *SysServeLicenseDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysServeLogDao is the data access object for the table hg_sys_serve_log.
|
||||
type SysServeLogDao 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 SysServeLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysServeLogColumns defines and stores column names for the table hg_sys_serve_log.
|
||||
type SysServeLogColumns struct {
|
||||
Id string // 日志ID
|
||||
TraceId string // 链路ID
|
||||
LevelFormat string // 日志级别
|
||||
Content string // 日志内容
|
||||
Stack string // 打印堆栈
|
||||
Line string // 调用行
|
||||
TriggerNs string // 触发时间(ns)
|
||||
Status string // 状态
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// sysServeLogColumns holds the columns for the table hg_sys_serve_log.
|
||||
var sysServeLogColumns = SysServeLogColumns{
|
||||
Id: "id",
|
||||
TraceId: "trace_id",
|
||||
LevelFormat: "level_format",
|
||||
Content: "content",
|
||||
Stack: "stack",
|
||||
Line: "line",
|
||||
TriggerNs: "trigger_ns",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysServeLogDao creates and returns a new DAO object for table data access.
|
||||
func NewSysServeLogDao(handlers ...gdb.ModelHandler) *SysServeLogDao {
|
||||
return &SysServeLogDao{
|
||||
group: "default",
|
||||
table: "hg_sys_serve_log",
|
||||
columns: sysServeLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysServeLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysServeLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysServeLogDao) Columns() SysServeLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysServeLogDao) 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 *SysServeLogDao) 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 *SysServeLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysSmsLogDao is the data access object for the table hg_sys_sms_log.
|
||||
type SysSmsLogDao 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 SysSmsLogColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// SysSmsLogColumns defines and stores column names for the table hg_sys_sms_log.
|
||||
type SysSmsLogColumns struct {
|
||||
Id string // 主键
|
||||
Event string // 事件
|
||||
Mobile string // 手机号
|
||||
Code string // 验证码或短信内容
|
||||
Times string // 验证次数
|
||||
Ip string // ip地址
|
||||
Status string // 状态(1未验证,2已验证)
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
// sysSmsLogColumns holds the columns for the table hg_sys_sms_log.
|
||||
var sysSmsLogColumns = SysSmsLogColumns{
|
||||
Id: "id",
|
||||
Event: "event",
|
||||
Mobile: "mobile",
|
||||
Code: "code",
|
||||
Times: "times",
|
||||
Ip: "ip",
|
||||
Status: "status",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysSmsLogDao creates and returns a new DAO object for table data access.
|
||||
func NewSysSmsLogDao(handlers ...gdb.ModelHandler) *SysSmsLogDao {
|
||||
return &SysSmsLogDao{
|
||||
group: "default",
|
||||
table: "hg_sys_sms_log",
|
||||
columns: sysSmsLogColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *SysSmsLogDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *SysSmsLogDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *SysSmsLogDao) Columns() SysSmsLogColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *SysSmsLogDao) 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 *SysSmsLogDao) 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 *SysSmsLogDao) 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,127 @@
|
||||
// ==========================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// TaskDao is the data access object for the table hg_task.
|
||||
type TaskDao 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 TaskColumns // columns contains all the column names of Table for convenient usage.
|
||||
handlers []gdb.ModelHandler // handlers for customized model modification.
|
||||
}
|
||||
|
||||
// TaskColumns defines and stores column names for the table hg_task.
|
||||
type TaskColumns struct {
|
||||
Id string // 主键
|
||||
TenantId string // 租户ID
|
||||
TaskNo string // 任务编号
|
||||
HallId string // 任务大厅ID
|
||||
Title string // 标题
|
||||
Description string // 描述
|
||||
DetailHtml string // 清洗后的任务详情
|
||||
CoverAttachmentId string // 封面附件ID
|
||||
CoverUrl string // 封面地址
|
||||
CommissionAmount string // 固定佣金(分)
|
||||
CommissionRate string // 佣金万分比
|
||||
DailyLimit string // 每日总量
|
||||
PerMemberLimit string // 单会员限制
|
||||
StartAt string // 开始时间
|
||||
EndAt string // 结束时间
|
||||
PublishStatus string // 发布状态
|
||||
Sort string // 排序
|
||||
Version string // 乐观锁
|
||||
Remark string // 备注
|
||||
CreatedBy string // 创建者
|
||||
UpdatedBy string // 更新者
|
||||
DeletedBy string // 删除者
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 删除时间
|
||||
}
|
||||
|
||||
// taskColumns holds the columns for the table hg_task.
|
||||
var taskColumns = TaskColumns{
|
||||
Id: "id",
|
||||
TenantId: "tenant_id",
|
||||
TaskNo: "task_no",
|
||||
HallId: "hall_id",
|
||||
Title: "title",
|
||||
Description: "description",
|
||||
DetailHtml: "detail_html",
|
||||
CoverAttachmentId: "cover_attachment_id",
|
||||
CoverUrl: "cover_url",
|
||||
CommissionAmount: "commission_amount",
|
||||
CommissionRate: "commission_rate",
|
||||
DailyLimit: "daily_limit",
|
||||
PerMemberLimit: "per_member_limit",
|
||||
StartAt: "start_at",
|
||||
EndAt: "end_at",
|
||||
PublishStatus: "publish_status",
|
||||
Sort: "sort",
|
||||
Version: "version",
|
||||
Remark: "remark",
|
||||
CreatedBy: "created_by",
|
||||
UpdatedBy: "updated_by",
|
||||
DeletedBy: "deleted_by",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
}
|
||||
|
||||
// NewTaskDao creates and returns a new DAO object for table data access.
|
||||
func NewTaskDao(handlers ...gdb.ModelHandler) *TaskDao {
|
||||
return &TaskDao{
|
||||
group: "default",
|
||||
table: "hg_task",
|
||||
columns: taskColumns,
|
||||
handlers: handlers,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
||||
func (dao *TaskDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of the current DAO.
|
||||
func (dao *TaskDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of the current DAO.
|
||||
func (dao *TaskDao) Columns() TaskColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the database configuration group name of the current DAO.
|
||||
func (dao *TaskDao) 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 *TaskDao) 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 *TaskDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user