Skip to content

Commit 6039db8

Browse files
committed
updated initial version to be a minor release
1 parent 25a8a1c commit 6039db8

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
All notable changes to this project will be documented in this file. This project adhere to the [Semantic Versioning](http://semver.org/) standard.
44

5-
## [0.0.1] 2025-09-24
5+
## [0.1.0] 2025-10-02
66

77
* Feature - Initial release of Schema Models.
88

9-
[0.0.1]: https://github.com/stellarwp/schema-models/releases/tag/0.0.1
9+
[0.1.0]: https://github.com/stellarwp/schema-models/releases/tag/0.1.0

schema-models.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @wordpress-plugin
1010
* Plugin Name: Schema Models
1111
* Description: A library for models based on Schema definitions.
12-
* Version: 0.0.1
12+
* Version: 0.1.0
1313
* Author: StellarWP
1414
* Author URI: https://stellarwp.com
1515
* License: MIT

src/Contracts/SchemaModel.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* The schema model contract.
44
*
5-
* @since 0.0.1
5+
* @since 0.1.0
66
*
77
* @package StellarWP\SchemaModels\Contracts;
88
*/
@@ -18,7 +18,7 @@ interface SchemaModel extends Model {
1818
/**
1919
* Gets the primary value of the model.
2020
*
21-
* @since 0.0.1
21+
* @since 0.1.0
2222
*
2323
* @return mixed
2424
*/
@@ -27,7 +27,7 @@ public function getPrimaryValue();
2727
/**
2828
* Gets the primary column of the model.
2929
*
30-
* @since 0.0.1
30+
* @since 0.1.0
3131
*
3232
* @return string
3333
*/
@@ -36,7 +36,7 @@ public function getPrimaryColumn(): string;
3636
/**
3737
* Gets the table interface of the model.
3838
*
39-
* @since 0.0.1
39+
* @since 0.1.0
4040
*
4141
* @return Table_Interface
4242
*/
@@ -45,7 +45,7 @@ public static function getTableInterface(): Table_Interface;
4545
/**
4646
* Gets the relationships of the model.
4747
*
48-
* @since 0.0.1
48+
* @since 0.1.0
4949
*
5050
* @return array The relationships of the model.
5151
*/
@@ -54,7 +54,7 @@ public function getRelationships(): array;
5454
/**
5555
* Deletes the relationship data for a given key.
5656
*
57-
* @since 0.0.1
57+
* @since 0.1.0
5858
*
5959
* @param string $key The key of the relationship.
6060
*/
@@ -63,7 +63,7 @@ public function deleteRelationshipData( string $key ): void;
6363
/**
6464
* Adds an ID to a relationship.
6565
*
66-
* @since 0.0.1
66+
* @since 0.1.0
6767
*
6868
* @param string $key The key of the relationship.
6969
* @param int $id The ID to add.
@@ -73,7 +73,7 @@ public function addToRelationship( string $key, int $id ): void;
7373
/**
7474
* Removes an ID from a relationship.
7575
*
76-
* @since 0.0.1
76+
* @since 0.1.0
7777
*
7878
* @param string $key The key of the relationship.
7979
* @param int $id The ID to remove.
@@ -83,7 +83,7 @@ public function removeFromRelationship( string $key, int $id ): void;
8383
/**
8484
* Saves the model.
8585
*
86-
* @since 0.0.1
86+
* @since 0.1.0
8787
*
8888
* @return int The ID of the saved model.
8989
*/
@@ -92,7 +92,7 @@ public function save(): int;
9292
/**
9393
* Deletes the model.
9494
*
95-
* @since 0.0.1
95+
* @since 0.1.0
9696
*
9797
* @return bool Whether the model was deleted.
9898
*/

src/SchemaModel.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* The schema model.
44
*
5-
* @since 0.0.1
5+
* @since 0.1.0
66
*
77
* @package StellarWP\SchemaModels;
88
*/
@@ -27,15 +27,15 @@
2727
/**
2828
* The schema model.
2929
*
30-
* @since 0.0.1
30+
* @since 0.1.0
3131
*
3232
* @package StellarWP\SchemaModels;
3333
*/
3434
abstract class SchemaModel extends Model implements SchemaModelInterface {
3535
/**
3636
* The relationship data of the model.
3737
*
38-
* @since 0.0.1
38+
* @since 0.1.0
3939
*
4040
* @var array
4141
*/
@@ -58,7 +58,7 @@ abstract class SchemaModel extends Model implements SchemaModelInterface {
5858
/**
5959
* Acts as the constructor.
6060
*
61-
* @since 0.0.1
61+
* @since 0.1.0
6262
*/
6363
protected function afterConstruct(): void {
6464
$this->constructRelationships();
@@ -74,7 +74,7 @@ protected function constructRelationships(): void {}
7474
/**
7575
* Gets the table interface of the model.
7676
*
77-
* @since 0.0.1
77+
* @since 0.1.0
7878
*
7979
* @return Table_Interface
8080
*/
@@ -83,7 +83,7 @@ abstract public static function getTableInterface(): Table_Interface;
8383
/**
8484
* Gets the table class of the model.
8585
*
86-
* @since 0.0.1
86+
* @since 0.1.0
8787
*
8888
* @return string
8989
*/
@@ -94,7 +94,7 @@ protected static function getTableClass(): string {
9494
/**
9595
* Gets the primary value of the model.
9696
*
97-
* @since 0.0.1
97+
* @since 0.1.0
9898
*
9999
* @return mixed
100100
*/
@@ -105,7 +105,7 @@ public function getPrimaryValue() {
105105
/**
106106
* Gets the primary column of the model.
107107
*
108-
* @since 0.0.1
108+
* @since 0.1.0
109109
*
110110
* @return string
111111
*/
@@ -116,7 +116,7 @@ public function getPrimaryColumn(): string {
116116
/**
117117
* Magic method to get the relationships of the model.
118118
*
119-
* @since 0.0.1
119+
* @since 0.1.0
120120
*
121121
* @param string $name The name of the method.
122122
* @param array $arguments The arguments of the method.
@@ -161,7 +161,7 @@ public function __call( string $name, array $arguments ) {
161161
/**
162162
* Gets the relationships of the model.
163163
*
164-
* @since 0.0.1
164+
* @since 0.1.0
165165
*
166166
* @return array The relationships of the model.
167167
*/
@@ -172,7 +172,7 @@ public function getRelationships(): array {
172172
/**
173173
* Deletes the relationship data for a given key.
174174
*
175-
* @since 0.0.1
175+
* @since 0.1.0
176176
*
177177
* @param string $key The key of the relationship.
178178
*
@@ -191,7 +191,7 @@ public function deleteRelationshipData( string $key ): void {
191191
/**
192192
* Adds an ID to a relationship.
193193
*
194-
* @since 0.0.1
194+
* @since 0.1.0
195195
*
196196
* @param string $key The key of the relationship.
197197
* @param int $id The ID to add.
@@ -223,7 +223,7 @@ public function addToRelationship( string $key, int $id ): void {
223223
/**
224224
* Removes an ID from a relationship.
225225
*
226-
* @since 0.0.1
226+
* @since 0.1.0
227227
*
228228
* @param string $key The key of the relationship.
229229
* @param int $id The ID to remove.
@@ -262,7 +262,7 @@ public function removeFromRelationship( string $key, int $id ): void {
262262
* either by completely replacing the logic or by calling parent::generatePropertyDefinitions()
263263
* and modifying the results.
264264
*
265-
* @since 0.0.1
265+
* @since 0.1.0
266266
*
267267
* @return array<string,ModelPropertyDefinition>
268268
*
@@ -367,7 +367,7 @@ protected function setRelationship( string $key, $value ): void {
367367
/**
368368
* Returns a relationship.
369369
*
370-
* @since 0.0.1
370+
* @since 0.1.0
371371
*
372372
* @param string $key Relationship name.
373373
*
@@ -418,7 +418,7 @@ protected function getRelationship( string $key ) {
418418
/**
419419
* Saves the relationship data.
420420
*
421-
* @since 0.0.1
421+
* @since 0.1.0
422422
*
423423
* @return void
424424
*/
@@ -460,7 +460,7 @@ private function saveRelationshipData(): void {
460460
/**
461461
* Saves the model.
462462
*
463-
* @since 0.0.1
463+
* @since 0.1.0
464464
*
465465
* @return int The id of the saved model.
466466
*
@@ -516,7 +516,7 @@ public function delete(): bool {
516516
/**
517517
* Deletes all the relationship data.
518518
*
519-
* @since 0.0.1
519+
* @since 0.1.0
520520
*
521521
* @return void
522522
*/
@@ -533,7 +533,7 @@ private function deleteAllRelationshipData(): void {
533533
/**
534534
* Sets a relationship for the model.
535535
*
536-
* @since 0.0.1
536+
* @since 0.1.0
537537
*
538538
* @param string $key The key of the relationship.
539539
* @param string $type The type of the relationship.
@@ -551,7 +551,7 @@ protected function defineRelationship( string $key, string $type, ?string $throu
551551
/**
552552
* Sets the relationship columns for the model.
553553
*
554-
* @since 0.0.1
554+
* @since 0.1.0
555555
*
556556
* @param string $key The key of the relationship.
557557
* @param string $this_entity_column The column of the relationship.

0 commit comments

Comments
 (0)