WIP member and properties

This commit is contained in:
Moritz 2025-04-28 17:56:58 +02:00
parent 2116ee1e91
commit 45fc52d6fb
Signed by: moritz
GPG key ID: 1020A035E5DD0824
10 changed files with 446 additions and 1 deletions

View file

@ -0,0 +1,28 @@
defmodule Mv.Membership.Property do
use Ash.Resource,
domain: Mv.Membership,
data_layer: AshPostgres.DataLayer
postgres do
table "attribute"
repo Mv.Repo
end
actions do
defaults [:create, :read, :update, :destroy]
default_accept [:value, :member_id, :property_type_id]
end
attributes do
uuid_primary_key :id
attribute :value, :string,
description: "Speichert den Wert, Typ-Interpretation per property_type.typ"
end
relationships do
belongs_to :member, Mv.Membership.Member
belongs_to :property_type, Mv.Membership.PropertyType
end
end