ROM Commands for Post and Company
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateCompany < ROM::Commands::Create[:sql] | |
relation :companies | |
register_as :create | |
result :one | |
use :timestamps | |
timestamp :created_at, :updated_at | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreatePost < ROM::Commands::Create[:sql] | |
relation :posts | |
register_as :create | |
result :one | |
use :timestamps | |
timestamp :scrapped_at, :created_at, :updated_at | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeleteCompany < ROM::Commands::Delete[:sql] | |
relation :companies | |
register_as :delete | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeletePost < ROM::Commands::Delete[:sql] | |
relation :posts | |
register_as :delete | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UpdatePost < ROM::Commands::Update[:sql] | |
relation :posts | |
register_as :update | |
use :timestamps | |
timestamp :updated_at | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment