defmodule Jnb.Support.TeamTicket do use Ash.Resource, otp_app: :jnb, domain: Jnb.Support, data_layer: AshPostgres.DataLayer postgres do table "team_tickets" repo Jnb.Repo end actions do defaults [:create, :read, :update, :destroy] default_accept [:team_id, :ticket_id] end relationships do belongs_to :team, Jnb.Support.Team do attribute_type :uuid allow_nil? false primary_key? true end belongs_to :ticket, Jnb.Support.Ticket do attribute_type :uuid allow_nil? false primary_key? true end end end