This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
defmodule ElixirAi.Data.ConversationSchema do
|
||||
use Ecto.Schema
|
||||
defstruct [:id, :name, :ai_provider_id, :inserted_at, :updated_at]
|
||||
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
@foreign_key_type :binary_id
|
||||
|
||||
schema "conversations" do
|
||||
field(:name, :string)
|
||||
belongs_to(:ai_provider, ElixirAi.Data.AiProviderSchema, type: :binary_id)
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
def schema do
|
||||
Zoi.object(%{
|
||||
id: Zoi.string(),
|
||||
name: Zoi.string(),
|
||||
ai_provider_id: Zoi.string()
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user