```ruby
class Order < ApplicationRecord
  belongs_to :users
  serialize :user_id
  serialize :item_id
  has_many :items
end
```

Update belongs_to validation by giving it an optional: true
user
```ruby
class Order < ApplicationRecord
  belongs_to :user, optional: true
  serialize :user_id
  serialize :item_id
  has_many :items
end
```
assistant