Files
MonkeyCode/backend/db/runtime/runtime.go
2025-06-30 19:04:09 +08:00

236 lines
15 KiB
Go

// Code generated by ent, DO NOT EDIT.
package runtime
import (
"time"
"github.com/chaitin/MonkeyCode/backend/consts"
"github.com/chaitin/MonkeyCode/backend/db/admin"
"github.com/chaitin/MonkeyCode/backend/db/adminloginhistory"
"github.com/chaitin/MonkeyCode/backend/db/apikey"
"github.com/chaitin/MonkeyCode/backend/db/billingplan"
"github.com/chaitin/MonkeyCode/backend/db/billingquota"
"github.com/chaitin/MonkeyCode/backend/db/billingrecord"
"github.com/chaitin/MonkeyCode/backend/db/billingusage"
"github.com/chaitin/MonkeyCode/backend/db/invitecode"
"github.com/chaitin/MonkeyCode/backend/db/model"
"github.com/chaitin/MonkeyCode/backend/db/setting"
"github.com/chaitin/MonkeyCode/backend/db/task"
"github.com/chaitin/MonkeyCode/backend/db/taskrecord"
"github.com/chaitin/MonkeyCode/backend/db/user"
"github.com/chaitin/MonkeyCode/backend/db/userloginhistory"
"github.com/chaitin/MonkeyCode/backend/ent/schema"
)
// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
func init() {
adminFields := schema.Admin{}.Fields()
_ = adminFields
// adminDescLastActiveAt is the schema descriptor for last_active_at field.
adminDescLastActiveAt := adminFields[4].Descriptor()
// admin.DefaultLastActiveAt holds the default value on creation for the last_active_at field.
admin.DefaultLastActiveAt = adminDescLastActiveAt.Default.(func() time.Time)
// adminDescCreatedAt is the schema descriptor for created_at field.
adminDescCreatedAt := adminFields[5].Descriptor()
// admin.DefaultCreatedAt holds the default value on creation for the created_at field.
admin.DefaultCreatedAt = adminDescCreatedAt.Default.(func() time.Time)
// adminDescUpdatedAt is the schema descriptor for updated_at field.
adminDescUpdatedAt := adminFields[6].Descriptor()
// admin.DefaultUpdatedAt holds the default value on creation for the updated_at field.
admin.DefaultUpdatedAt = adminDescUpdatedAt.Default.(func() time.Time)
// admin.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
admin.UpdateDefaultUpdatedAt = adminDescUpdatedAt.UpdateDefault.(func() time.Time)
adminloginhistoryFields := schema.AdminLoginHistory{}.Fields()
_ = adminloginhistoryFields
// adminloginhistoryDescCreatedAt is the schema descriptor for created_at field.
adminloginhistoryDescCreatedAt := adminloginhistoryFields[10].Descriptor()
// adminloginhistory.DefaultCreatedAt holds the default value on creation for the created_at field.
adminloginhistory.DefaultCreatedAt = adminloginhistoryDescCreatedAt.Default.(func() time.Time)
apikeyFields := schema.ApiKey{}.Fields()
_ = apikeyFields
// apikeyDescStatus is the schema descriptor for status field.
apikeyDescStatus := apikeyFields[4].Descriptor()
// apikey.DefaultStatus holds the default value on creation for the status field.
apikey.DefaultStatus = consts.ApiKeyStatus(apikeyDescStatus.Default.(string))
// apikeyDescCreatedAt is the schema descriptor for created_at field.
apikeyDescCreatedAt := apikeyFields[6].Descriptor()
// apikey.DefaultCreatedAt holds the default value on creation for the created_at field.
apikey.DefaultCreatedAt = apikeyDescCreatedAt.Default.(func() time.Time)
// apikeyDescUpdatedAt is the schema descriptor for updated_at field.
apikeyDescUpdatedAt := apikeyFields[7].Descriptor()
// apikey.DefaultUpdatedAt holds the default value on creation for the updated_at field.
apikey.DefaultUpdatedAt = apikeyDescUpdatedAt.Default.(func() time.Time)
// apikey.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
apikey.UpdateDefaultUpdatedAt = apikeyDescUpdatedAt.UpdateDefault.(func() time.Time)
billingplanFields := schema.BillingPlan{}.Fields()
_ = billingplanFields
// billingplanDescCreatedAt is the schema descriptor for created_at field.
billingplanDescCreatedAt := billingplanFields[4].Descriptor()
// billingplan.DefaultCreatedAt holds the default value on creation for the created_at field.
billingplan.DefaultCreatedAt = billingplanDescCreatedAt.Default.(func() time.Time)
// billingplanDescUpdatedAt is the schema descriptor for updated_at field.
billingplanDescUpdatedAt := billingplanFields[5].Descriptor()
// billingplan.DefaultUpdatedAt holds the default value on creation for the updated_at field.
billingplan.DefaultUpdatedAt = billingplanDescUpdatedAt.Default.(func() time.Time)
// billingplan.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
billingplan.UpdateDefaultUpdatedAt = billingplanDescUpdatedAt.UpdateDefault.(func() time.Time)
billingquotaMixin := schema.BillingQuota{}.Mixin()
billingquotaMixinHooks0 := billingquotaMixin[0].Hooks()
billingquota.Hooks[0] = billingquotaMixinHooks0[0]
billingquotaMixinInters0 := billingquotaMixin[0].Interceptors()
billingquota.Interceptors[0] = billingquotaMixinInters0[0]
billingquotaFields := schema.BillingQuota{}.Fields()
_ = billingquotaFields
// billingquotaDescCreatedAt is the schema descriptor for created_at field.
billingquotaDescCreatedAt := billingquotaFields[5].Descriptor()
// billingquota.DefaultCreatedAt holds the default value on creation for the created_at field.
billingquota.DefaultCreatedAt = billingquotaDescCreatedAt.Default.(func() time.Time)
// billingquotaDescUpdatedAt is the schema descriptor for updated_at field.
billingquotaDescUpdatedAt := billingquotaFields[6].Descriptor()
// billingquota.DefaultUpdatedAt holds the default value on creation for the updated_at field.
billingquota.DefaultUpdatedAt = billingquotaDescUpdatedAt.Default.(func() time.Time)
// billingquota.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
billingquota.UpdateDefaultUpdatedAt = billingquotaDescUpdatedAt.UpdateDefault.(func() time.Time)
billingrecordFields := schema.BillingRecord{}.Fields()
_ = billingrecordFields
// billingrecordDescRequestTime is the schema descriptor for request_time field.
billingrecordDescRequestTime := billingrecordFields[8].Descriptor()
// billingrecord.DefaultRequestTime holds the default value on creation for the request_time field.
billingrecord.DefaultRequestTime = billingrecordDescRequestTime.Default.(func() time.Time)
// billingrecordDescCreatedAt is the schema descriptor for created_at field.
billingrecordDescCreatedAt := billingrecordFields[10].Descriptor()
// billingrecord.DefaultCreatedAt holds the default value on creation for the created_at field.
billingrecord.DefaultCreatedAt = billingrecordDescCreatedAt.Default.(func() time.Time)
// billingrecordDescUpdatedAt is the schema descriptor for updated_at field.
billingrecordDescUpdatedAt := billingrecordFields[11].Descriptor()
// billingrecord.DefaultUpdatedAt holds the default value on creation for the updated_at field.
billingrecord.DefaultUpdatedAt = billingrecordDescUpdatedAt.Default.(func() time.Time)
// billingrecord.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
billingrecord.UpdateDefaultUpdatedAt = billingrecordDescUpdatedAt.UpdateDefault.(func() time.Time)
billingusageMixin := schema.BillingUsage{}.Mixin()
billingusageMixinHooks0 := billingusageMixin[0].Hooks()
billingusage.Hooks[0] = billingusageMixinHooks0[0]
billingusageMixinInters0 := billingusageMixin[0].Interceptors()
billingusage.Interceptors[0] = billingusageMixinInters0[0]
billingusageFields := schema.BillingUsage{}.Fields()
_ = billingusageFields
// billingusageDescCreatedAt is the schema descriptor for created_at field.
billingusageDescCreatedAt := billingusageFields[5].Descriptor()
// billingusage.DefaultCreatedAt holds the default value on creation for the created_at field.
billingusage.DefaultCreatedAt = billingusageDescCreatedAt.Default.(func() time.Time)
// billingusageDescUpdatedAt is the schema descriptor for updated_at field.
billingusageDescUpdatedAt := billingusageFields[6].Descriptor()
// billingusage.DefaultUpdatedAt holds the default value on creation for the updated_at field.
billingusage.DefaultUpdatedAt = billingusageDescUpdatedAt.Default.(func() time.Time)
// billingusage.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
billingusage.UpdateDefaultUpdatedAt = billingusageDescUpdatedAt.UpdateDefault.(func() time.Time)
invitecodeFields := schema.InviteCode{}.Fields()
_ = invitecodeFields
// invitecodeDescCreatedAt is the schema descriptor for created_at field.
invitecodeDescCreatedAt := invitecodeFields[3].Descriptor()
// invitecode.DefaultCreatedAt holds the default value on creation for the created_at field.
invitecode.DefaultCreatedAt = invitecodeDescCreatedAt.Default.(func() time.Time)
// invitecodeDescUpdatedAt is the schema descriptor for updated_at field.
invitecodeDescUpdatedAt := invitecodeFields[4].Descriptor()
// invitecode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
invitecode.DefaultUpdatedAt = invitecodeDescUpdatedAt.Default.(func() time.Time)
// invitecode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
invitecode.UpdateDefaultUpdatedAt = invitecodeDescUpdatedAt.UpdateDefault.(func() time.Time)
modelFields := schema.Model{}.Fields()
_ = modelFields
// modelDescStatus is the schema descriptor for status field.
modelDescStatus := modelFields[9].Descriptor()
// model.DefaultStatus holds the default value on creation for the status field.
model.DefaultStatus = consts.ModelStatus(modelDescStatus.Default.(string))
// modelDescCreatedAt is the schema descriptor for created_at field.
modelDescCreatedAt := modelFields[11].Descriptor()
// model.DefaultCreatedAt holds the default value on creation for the created_at field.
model.DefaultCreatedAt = modelDescCreatedAt.Default.(func() time.Time)
// modelDescUpdatedAt is the schema descriptor for updated_at field.
modelDescUpdatedAt := modelFields[12].Descriptor()
// model.DefaultUpdatedAt holds the default value on creation for the updated_at field.
model.DefaultUpdatedAt = modelDescUpdatedAt.Default.(func() time.Time)
// model.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
model.UpdateDefaultUpdatedAt = modelDescUpdatedAt.UpdateDefault.(func() time.Time)
settingFields := schema.Setting{}.Fields()
_ = settingFields
// settingDescEnableSSO is the schema descriptor for enable_sso field.
settingDescEnableSSO := settingFields[1].Descriptor()
// setting.DefaultEnableSSO holds the default value on creation for the enable_sso field.
setting.DefaultEnableSSO = settingDescEnableSSO.Default.(bool)
// settingDescForceTwoFactorAuth is the schema descriptor for force_two_factor_auth field.
settingDescForceTwoFactorAuth := settingFields[2].Descriptor()
// setting.DefaultForceTwoFactorAuth holds the default value on creation for the force_two_factor_auth field.
setting.DefaultForceTwoFactorAuth = settingDescForceTwoFactorAuth.Default.(bool)
// settingDescDisablePasswordLogin is the schema descriptor for disable_password_login field.
settingDescDisablePasswordLogin := settingFields[3].Descriptor()
// setting.DefaultDisablePasswordLogin holds the default value on creation for the disable_password_login field.
setting.DefaultDisablePasswordLogin = settingDescDisablePasswordLogin.Default.(bool)
// settingDescCreatedAt is the schema descriptor for created_at field.
settingDescCreatedAt := settingFields[4].Descriptor()
// setting.DefaultCreatedAt holds the default value on creation for the created_at field.
setting.DefaultCreatedAt = settingDescCreatedAt.Default.(func() time.Time)
// settingDescUpdatedAt is the schema descriptor for updated_at field.
settingDescUpdatedAt := settingFields[5].Descriptor()
// setting.DefaultUpdatedAt holds the default value on creation for the updated_at field.
setting.DefaultUpdatedAt = settingDescUpdatedAt.Default.(func() time.Time)
// setting.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
setting.UpdateDefaultUpdatedAt = settingDescUpdatedAt.UpdateDefault.(func() time.Time)
taskFields := schema.Task{}.Fields()
_ = taskFields
// taskDescIsAccept is the schema descriptor for is_accept field.
taskDescIsAccept := taskFields[7].Descriptor()
// task.DefaultIsAccept holds the default value on creation for the is_accept field.
task.DefaultIsAccept = taskDescIsAccept.Default.(bool)
// taskDescCreatedAt is the schema descriptor for created_at field.
taskDescCreatedAt := taskFields[14].Descriptor()
// task.DefaultCreatedAt holds the default value on creation for the created_at field.
task.DefaultCreatedAt = taskDescCreatedAt.Default.(func() time.Time)
// taskDescUpdatedAt is the schema descriptor for updated_at field.
taskDescUpdatedAt := taskFields[15].Descriptor()
// task.DefaultUpdatedAt holds the default value on creation for the updated_at field.
task.DefaultUpdatedAt = taskDescUpdatedAt.Default.(func() time.Time)
// task.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
task.UpdateDefaultUpdatedAt = taskDescUpdatedAt.UpdateDefault.(func() time.Time)
taskrecordFields := schema.TaskRecord{}.Fields()
_ = taskrecordFields
// taskrecordDescCreatedAt is the schema descriptor for created_at field.
taskrecordDescCreatedAt := taskrecordFields[4].Descriptor()
// taskrecord.DefaultCreatedAt holds the default value on creation for the created_at field.
taskrecord.DefaultCreatedAt = taskrecordDescCreatedAt.Default.(func() time.Time)
// taskrecordDescUpdatedAt is the schema descriptor for updated_at field.
taskrecordDescUpdatedAt := taskrecordFields[5].Descriptor()
// taskrecord.DefaultUpdatedAt holds the default value on creation for the updated_at field.
taskrecord.DefaultUpdatedAt = taskrecordDescUpdatedAt.Default.(func() time.Time)
// taskrecord.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
taskrecord.UpdateDefaultUpdatedAt = taskrecordDescUpdatedAt.UpdateDefault.(func() time.Time)
userFields := schema.User{}.Fields()
_ = userFields
// userDescStatus is the schema descriptor for status field.
userDescStatus := userFields[4].Descriptor()
// user.DefaultStatus holds the default value on creation for the status field.
user.DefaultStatus = consts.UserStatus(userDescStatus.Default.(string))
// userDescCreatedAt is the schema descriptor for created_at field.
userDescCreatedAt := userFields[5].Descriptor()
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
// userDescUpdatedAt is the schema descriptor for updated_at field.
userDescUpdatedAt := userFields[6].Descriptor()
// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
userloginhistoryFields := schema.UserLoginHistory{}.Fields()
_ = userloginhistoryFields
// userloginhistoryDescCreatedAt is the schema descriptor for created_at field.
userloginhistoryDescCreatedAt := userloginhistoryFields[10].Descriptor()
// userloginhistory.DefaultCreatedAt holds the default value on creation for the created_at field.
userloginhistory.DefaultCreatedAt = userloginhistoryDescCreatedAt.Default.(func() time.Time)
}
const (
Version = "v0.14.4" // Version of ent codegen.
Sum = "h1:/DhDraSLXIkBhyiVoJeSshr4ZYi7femzhj6/TckzZuI=" // Sum of ent codegen.
)