1: <?php
2:
3: namespace LaravelUi5\Core\Contracts;
4:
5: /**
6: * Contract for any domain object representing a business partner —
7: * i.e., an individual or organization capable of owning records,
8: * receiving settings, or acting within the system.
9: *
10: * This interface provides the minimal required identity for resolving
11: * context, auditing, ownership, and settings-related concerns.
12: *
13: * It deliberately avoids any dependencies on the Auth package.
14: * For role-based access logic, see RoleAwareBusinessPartnerInterface (in Auth).
15: */
16: interface BusinessPartnerInterface
17: {
18: /**
19: * Returns the unique internal ID of this business partner.
20: *
21: * This ID is used for identity resolution, ownership, logging, and
22: * contextual lookups throughout the system.
23: *
24: * @return int
25: */
26: public function getId(): int;
27:
28: /**
29: * Returns a human-readable display name for this business partner.
30: *
31: * This is useful for logs, UI representations, audits, and
32: * debugging purposes.
33: *
34: * @return string
35: */
36: public function getDisplayName(): string;
37:
38: /**
39: * Returns the IDs of all teams this business partner is currently a member of.
40: *
41: * This is primarily used to determine group-level visibility or permission contexts,
42: * such as team-level settings overrides.
43: *
44: * If your system does not support teams, this method may return an empty array.
45: *
46: * @return int[] List of team IDs the partner belongs to
47: */
48: public function getTeamIds(): array;
49: }
50: