Starting to get things rolling
This commit is contained in:
12
lib/resource_owner/application.ex
Normal file
12
lib/resource_owner/application.ex
Normal file
@@ -0,0 +1,12 @@
|
||||
defmodule ResourceOwner.Application do
|
||||
use Application
|
||||
|
||||
@impl true
|
||||
def start(_type, _args) do
|
||||
children = [
|
||||
ResourceOwner.Repo,
|
||||
]
|
||||
opts = [strategy: :one_for_one, name: ResourceOwner.Supervisor]
|
||||
Supervisor.start_link(children, opts)
|
||||
end
|
||||
end
|
||||
7
lib/resource_owner/organization.ex
Normal file
7
lib/resource_owner/organization.ex
Normal file
@@ -0,0 +1,7 @@
|
||||
defmodule ResourceOwner.Organization do
|
||||
use Ecto.Schema
|
||||
|
||||
schema "organizations" do
|
||||
field :name, :string
|
||||
end
|
||||
end
|
||||
5
lib/resource_owner/repo.ex
Normal file
5
lib/resource_owner/repo.ex
Normal file
@@ -0,0 +1,5 @@
|
||||
defmodule ResourceOwner.Repo do
|
||||
use Ecto.Repo,
|
||||
otp_app: :resource_owner,
|
||||
adapter: Ecto.Adapters.Postgres
|
||||
end
|
||||
Reference in New Issue
Block a user