final |
|---|
readonly |
The read surface a model releases to other modules: the columns and relations a consumer may read, join, filter and expand with a SemVer guarantee. Declared on the owner's model, in its DB package.
What it names is contract: a named column or relation that goes, is renamed or changes type is a major; a new one is a minor. Everything else is internal — the columns it does not name, the model's write surface (creating, updating, deleting, its events belong to the owner's operations), and every model without the attribute.
A released relation leads to a model that releases a read surface of its own.
#[ReadSurface(
columns: ['id', 'ext_ref', 'type', 'name', 'email', 'phone'],
relations: ['addresses'],
)]
class Partner extends Model { … }
| Methods | ||
|---|---|---|
public
|
__construct(list<string> $columns, list<string> $relations = [])
|
# |
| Properties | |||
|---|---|---|---|
public
|
list<string>
|
$columns
|
# |
public
|
list<string>
|
$relations
|
# |