refactor: remove redundant name fields from order service
This commit is contained in:
@@ -37,38 +37,26 @@ func init() {
|
||||
orderstatelogs.DefaultCreatedAt = orderstatelogsDescCreatedAt.Default.(func() time.Time)
|
||||
ordersFields := schema.Orders{}.Fields()
|
||||
_ = ordersFields
|
||||
// ordersDescConsumerName is the schema descriptor for consumer_name field.
|
||||
ordersDescConsumerName := ordersFields[2].Descriptor()
|
||||
// orders.ConsumerNameValidator is a validator for the "consumer_name" field. It is called by the builders before save.
|
||||
orders.ConsumerNameValidator = ordersDescConsumerName.Validators[0].(func(string) error)
|
||||
// ordersDescPlayerName is the schema descriptor for player_name field.
|
||||
ordersDescPlayerName := ordersFields[4].Descriptor()
|
||||
// orders.PlayerNameValidator is a validator for the "player_name" field. It is called by the builders before save.
|
||||
orders.PlayerNameValidator = ordersDescPlayerName.Validators[0].(func(string) error)
|
||||
// ordersDescShopName is the schema descriptor for shop_name field.
|
||||
ordersDescShopName := ordersFields[6].Descriptor()
|
||||
// orders.ShopNameValidator is a validator for the "shop_name" field. It is called by the builders before save.
|
||||
orders.ShopNameValidator = ordersDescShopName.Validators[0].(func(string) error)
|
||||
// ordersDescStatus is the schema descriptor for status field.
|
||||
ordersDescStatus := ordersFields[8].Descriptor()
|
||||
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[11].Descriptor()
|
||||
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[12].Descriptor()
|
||||
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[14].Descriptor()
|
||||
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[19].Descriptor()
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user