// Code generated by ent, DO NOT EDIT. package ent import ( "online-order/ent/business" "online-order/ent/businesscategory" "online-order/ent/businessconfig" "online-order/ent/domain" "online-order/ent/product" "online-order/ent/productcategory" "online-order/ent/schema" "online-order/ent/user" "time" ) // 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() { businessFields := schema.Business{}.Fields() _ = businessFields // businessDescName is the schema descriptor for name field. businessDescName := businessFields[0].Descriptor() // business.DefaultName holds the default value on creation for the name field. business.DefaultName = businessDescName.Default.(string) // businessDescCreatedAt is the schema descriptor for created_at field. businessDescCreatedAt := businessFields[7].Descriptor() // business.DefaultCreatedAt holds the default value on creation for the created_at field. business.DefaultCreatedAt = businessDescCreatedAt.Default.(func() time.Time) // businessDescUpdatedAt is the schema descriptor for updated_at field. businessDescUpdatedAt := businessFields[8].Descriptor() // business.DefaultUpdatedAt holds the default value on creation for the updated_at field. business.DefaultUpdatedAt = businessDescUpdatedAt.Default.(func() time.Time) // business.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. business.UpdateDefaultUpdatedAt = businessDescUpdatedAt.UpdateDefault.(func() time.Time) businesscategoryFields := schema.BusinessCategory{}.Fields() _ = businesscategoryFields // businesscategoryDescName is the schema descriptor for name field. businesscategoryDescName := businesscategoryFields[1].Descriptor() // businesscategory.DefaultName holds the default value on creation for the name field. businesscategory.DefaultName = businesscategoryDescName.Default.(string) // businesscategoryDescDescription is the schema descriptor for description field. businesscategoryDescDescription := businesscategoryFields[2].Descriptor() // businesscategory.DefaultDescription holds the default value on creation for the description field. businesscategory.DefaultDescription = businesscategoryDescDescription.Default.(string) businessconfigFields := schema.BusinessConfig{}.Fields() _ = businessconfigFields // businessconfigDescCompany is the schema descriptor for company field. businessconfigDescCompany := businessconfigFields[0].Descriptor() // businessconfig.DefaultCompany holds the default value on creation for the company field. businessconfig.DefaultCompany = businessconfigDescCompany.Default.(string) domainFields := schema.Domain{}.Fields() _ = domainFields // domainDescStatus is the schema descriptor for status field. domainDescStatus := domainFields[4].Descriptor() // domain.DefaultStatus holds the default value on creation for the status field. domain.DefaultStatus = domainDescStatus.Default.(bool) // domainDescCreatedAt is the schema descriptor for created_at field. domainDescCreatedAt := domainFields[5].Descriptor() // domain.DefaultCreatedAt holds the default value on creation for the created_at field. domain.DefaultCreatedAt = domainDescCreatedAt.Default.(func() time.Time) // domainDescUpdatedAt is the schema descriptor for updated_at field. domainDescUpdatedAt := domainFields[6].Descriptor() // domain.DefaultUpdatedAt holds the default value on creation for the updated_at field. domain.DefaultUpdatedAt = domainDescUpdatedAt.Default.(func() time.Time) // domain.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. domain.UpdateDefaultUpdatedAt = domainDescUpdatedAt.UpdateDefault.(func() time.Time) productFields := schema.Product{}.Fields() _ = productFields // productDescName is the schema descriptor for name field. productDescName := productFields[0].Descriptor() // product.DefaultName holds the default value on creation for the name field. product.DefaultName = productDescName.Default.(string) // productDescPrice is the schema descriptor for price field. productDescPrice := productFields[3].Descriptor() // product.DefaultPrice holds the default value on creation for the price field. product.DefaultPrice = productDescPrice.Default.(float64) // product.PriceValidator is a validator for the "price" field. It is called by the builders before save. product.PriceValidator = productDescPrice.Validators[0].(func(float64) error) // productDescOriginalPrice is the schema descriptor for original_price field. productDescOriginalPrice := productFields[4].Descriptor() // product.DefaultOriginalPrice holds the default value on creation for the original_price field. product.DefaultOriginalPrice = productDescOriginalPrice.Default.(float64) // product.OriginalPriceValidator is a validator for the "original_price" field. It is called by the builders before save. product.OriginalPriceValidator = productDescOriginalPrice.Validators[0].(func(float64) error) // productDescQuantity is the schema descriptor for quantity field. productDescQuantity := productFields[5].Descriptor() // product.DefaultQuantity holds the default value on creation for the quantity field. product.DefaultQuantity = productDescQuantity.Default.(int) // product.QuantityValidator is a validator for the "quantity" field. It is called by the builders before save. product.QuantityValidator = productDescQuantity.Validators[0].(func(int) error) // productDescStatus is the schema descriptor for status field. productDescStatus := productFields[6].Descriptor() // product.DefaultStatus holds the default value on creation for the status field. product.DefaultStatus = productDescStatus.Default.(bool) // productDescCreatedAt is the schema descriptor for created_at field. productDescCreatedAt := productFields[10].Descriptor() // product.DefaultCreatedAt holds the default value on creation for the created_at field. product.DefaultCreatedAt = productDescCreatedAt.Default.(time.Time) // productDescUpdatedAt is the schema descriptor for updated_at field. productDescUpdatedAt := productFields[11].Descriptor() // product.DefaultUpdatedAt holds the default value on creation for the updated_at field. product.DefaultUpdatedAt = productDescUpdatedAt.Default.(time.Time) // product.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. product.UpdateDefaultUpdatedAt = productDescUpdatedAt.UpdateDefault.(func() time.Time) productcategoryFields := schema.ProductCategory{}.Fields() _ = productcategoryFields // productcategoryDescName is the schema descriptor for name field. productcategoryDescName := productcategoryFields[0].Descriptor() // productcategory.DefaultName holds the default value on creation for the name field. productcategory.DefaultName = productcategoryDescName.Default.(string) // productcategoryDescStatus is the schema descriptor for status field. productcategoryDescStatus := productcategoryFields[3].Descriptor() // productcategory.DefaultStatus holds the default value on creation for the status field. productcategory.DefaultStatus = productcategoryDescStatus.Default.(bool) // productcategoryDescCreatedAt is the schema descriptor for created_at field. productcategoryDescCreatedAt := productcategoryFields[5].Descriptor() // productcategory.DefaultCreatedAt holds the default value on creation for the created_at field. productcategory.DefaultCreatedAt = productcategoryDescCreatedAt.Default.(time.Time) // productcategoryDescUpdatedAt is the schema descriptor for updated_at field. productcategoryDescUpdatedAt := productcategoryFields[6].Descriptor() // productcategory.DefaultUpdatedAt holds the default value on creation for the updated_at field. productcategory.DefaultUpdatedAt = productcategoryDescUpdatedAt.Default.(time.Time) // productcategory.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. productcategory.UpdateDefaultUpdatedAt = productcategoryDescUpdatedAt.UpdateDefault.(func() time.Time) userFields := schema.User{}.Fields() _ = userFields // userDescEmail is the schema descriptor for email field. userDescEmail := userFields[0].Descriptor() // user.EmailValidator is a validator for the "email" field. It is called by the builders before save. user.EmailValidator = userDescEmail.Validators[0].(func(string) error) // userDescFirstName is the schema descriptor for first_name field. userDescFirstName := userFields[2].Descriptor() // user.FirstNameValidator is a validator for the "first_name" field. It is called by the builders before save. user.FirstNameValidator = userDescFirstName.Validators[0].(func(string) error) // userDescLastName is the schema descriptor for last_name field. userDescLastName := userFields[3].Descriptor() // user.LastNameValidator is a validator for the "last_name" field. It is called by the builders before save. user.LastNameValidator = userDescLastName.Validators[0].(func(string) error) // userDescIsActive is the schema descriptor for is_active field. userDescIsActive := userFields[5].Descriptor() // user.DefaultIsActive holds the default value on creation for the is_active field. user.DefaultIsActive = userDescIsActive.Default.(bool) // userDescIsAdmin is the schema descriptor for is_admin field. userDescIsAdmin := userFields[6].Descriptor() // user.DefaultIsAdmin holds the default value on creation for the is_admin field. user.DefaultIsAdmin = userDescIsAdmin.Default.(bool) // userDescCreatedAt is the schema descriptor for created_at field. userDescCreatedAt := userFields[7].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[8].Descriptor() // user.DefaultUpdatedAt holds the default value on creation for the updated_at field. user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time) // user.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. user.UpdateDefaultUpdatedAt = userDescUpdatedAt.UpdateDefault.(func() time.Time) }