-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: rewrite model (MyModel and MyCRUD) #285
Conversation
- merge: MyModel and MyCRUD
- Tests: 56, Assertions: 7, Skipped: 49
- Tests: 56, Assertions: 13, Skipped: 45.
- Tests: 56, Assertions: 17, Skipped: 42
- Tests: 56, Assertions: 22, Skipped: 37
- Tests: 58, Assertions: 30, Skipped: 32
- add costume where `Query::whereBinds` - Tests: 59, Assertions: 33, Skipped: 30
- Tests: 60, Assertions: 34, Skipped: 30
- Tests: 67, Assertions: 66, Skipped: 11
@@ -0,0 +1,26 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ambigus with original Collection
, try to changes ModelCollection
or other.
- `Collection` upstream update and delete - add `Model::getPrimeryKey()`, `Model::isExist()`, `Model::findOrCreate` - change visibility `Model::$where` to be `protected` - 68 tests, 95 assertions
finishing... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better ux
/** | ||
* @return CollectionImmutable<string, mixed> | ||
*/ | ||
public function hasOne(string $table, string $ref = 'id') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about return as model, and Model::class
instead of table_nama
/** | ||
* @return CollectionImmutable<string|int, mixed> | ||
*/ | ||
public function hasMany(string $table, string $ref = 'id') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about return as model, and Model::class
instead of table_name
// private -------------------- | ||
|
||
/** | ||
* Get column change status (compare with fresh record). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reserves value
refactor model, combine MyModel and MYCRUD
MyCrud Capability
MyModel Capability