feat: closing last gaps in backend functions we have available

This commit is contained in:
2026-04-24 12:15:56 +02:00
parent 13ace08a41
commit f96759ab2f
16 changed files with 610 additions and 62 deletions

View File

@@ -0,0 +1,21 @@
defmodule BDS.CliSync.Notification do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
schema "db_notifications" do
field :entity_type, :string
field :entity_id, :string
field :action, Ecto.Enum, values: [:created, :updated, :deleted]
field :from_cli, :boolean, default: true
field :seen_at, :integer
field :created_at, :integer
end
def changeset(notification, attrs) do
notification
|> cast(attrs, [:entity_type, :entity_id, :action, :from_cli, :seen_at, :created_at], empty_values: [nil])
|> validate_required([:entity_type, :entity_id, :action, :from_cli, :created_at])
end
end