// Code generated by ent, DO NOT EDIT.

package models

import (
	"juwan-backend/app/order/rpc/internal/models/orders"
	"juwan-backend/app/order/rpc/internal/models/orderstatelogs"
	"juwan-backend/app/order/rpc/internal/models/schema"
	"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() {
	orderstatelogsFields := schema.OrderStateLogs{}.Fields()
	_ = orderstatelogsFields
	// orderstatelogsDescFromStatus is the schema descriptor for from_status field.
	orderstatelogsDescFromStatus := orderstatelogsFields[2].Descriptor()
	// orderstatelogs.FromStatusValidator is a validator for the "from_status" field. It is called by the builders before save.
	orderstatelogs.FromStatusValidator = orderstatelogsDescFromStatus.Validators[0].(func(string) error)
	// orderstatelogsDescToStatus is the schema descriptor for to_status field.
	orderstatelogsDescToStatus := orderstatelogsFields[3].Descriptor()
	// orderstatelogs.ToStatusValidator is a validator for the "to_status" field. It is called by the builders before save.
	orderstatelogs.ToStatusValidator = orderstatelogsDescToStatus.Validators[0].(func(string) error)
	// orderstatelogsDescAction is the schema descriptor for action field.
	orderstatelogsDescAction := orderstatelogsFields[4].Descriptor()
	// orderstatelogs.ActionValidator is a validator for the "action" field. It is called by the builders before save.
	orderstatelogs.ActionValidator = orderstatelogsDescAction.Validators[0].(func(string) error)
	// orderstatelogsDescActorRole is the schema descriptor for actor_role field.
	orderstatelogsDescActorRole := orderstatelogsFields[6].Descriptor()
	// orderstatelogs.ActorRoleValidator is a validator for the "actor_role" field. It is called by the builders before save.
	orderstatelogs.ActorRoleValidator = orderstatelogsDescActorRole.Validators[0].(func(string) error)
	// orderstatelogsDescCreatedAt is the schema descriptor for created_at field.
	orderstatelogsDescCreatedAt := orderstatelogsFields[8].Descriptor()
	// orderstatelogs.DefaultCreatedAt holds the default value on creation for the created_at field.
	orderstatelogs.DefaultCreatedAt = orderstatelogsDescCreatedAt.Default.(func() time.Time)
	ordersFields := schema.Orders{}.Fields()
	_ = ordersFields
	// ordersDescStatus is the schema descriptor for status field.
	ordersDescStatus := ordersFields[5].Descriptor()
	// orders.DefaultStatus holds the default value on creation for the status field.
	orders.DefaultStatus = ordersDescStatus.Default.(string)
	// orders.StatusValidator is a validator for the "status" field. It is called by the builders before save.
	orders.StatusValidator = ordersDescStatus.Validators[0].(func(string) error)
	// ordersDescVersion is the schema descriptor for version field.
	ordersDescVersion := ordersFields[8].Descriptor()
	// orders.DefaultVersion holds the default value on creation for the version field.
	orders.DefaultVersion = ordersDescVersion.Default.(int)
	// ordersDescTimeoutJobID is the schema descriptor for timeout_job_id field.
	ordersDescTimeoutJobID := ordersFields[9].Descriptor()
	// orders.TimeoutJobIDValidator is a validator for the "timeout_job_id" field. It is called by the builders before save.
	orders.TimeoutJobIDValidator = ordersDescTimeoutJobID.Validators[0].(func(string) error)
	// ordersDescCreatedAt is the schema descriptor for created_at field.
	ordersDescCreatedAt := ordersFields[11].Descriptor()
	// orders.DefaultCreatedAt holds the default value on creation for the created_at field.
	orders.DefaultCreatedAt = ordersDescCreatedAt.Default.(func() time.Time)
	// ordersDescUpdatedAt is the schema descriptor for updated_at field.
	ordersDescUpdatedAt := ordersFields[16].Descriptor()
	// orders.DefaultUpdatedAt holds the default value on creation for the updated_at field.
	orders.DefaultUpdatedAt = ordersDescUpdatedAt.Default.(func() time.Time)
	// orders.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
	orders.UpdateDefaultUpdatedAt = ordersDescUpdatedAt.UpdateDefault.(func() time.Time)
}
