123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
-
- namespace Luticate\Utils;
-
- use Illuminate\Database\Eloquent\Collection;
- use Illuminate\Database\Eloquent\Model;
-
- /**
- * LuModel
- *
- * @method static LuModel where($column, $operator, $value)
- * @method static LuModel orWhere($column, $operator, $value)
- * @method static LuModel orderBy($column, $order)
- * @method static LuModel take($count)
- * @method static LuModel offset($offset)
- * @method static LuModel rightJoin($table, $column1, $operator, $column2)
- * @method static LuModel leftJoin($table, $column1, $operator, $column2)
- * @method static LuModel join($table, $column1, $operator, $column2)
- * @method static LuModel groupBy($column)
- * @method static LuModel[] get()
- * @method static LuModel first()
- * @method static int count()
- */
- abstract class LuModel extends Model
- {
- /**
- * Mapping from DBO model to business model.
- * If this model has no DBO equivalent, do nothing in this function
- * @return LuDbo
- */
- public abstract function toDbo();
-
- /**
- * @param $dbo LuDbo
- * @param $dal LuModel|null
- * @return LuModel
- */
- public abstract function fromDbo($dbo, $dal = null);
- }
|