1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
-
- namespace Luticate\Utils;
-
- use Illuminate\Database\Eloquent\Collection;
- use Illuminate\Database\Eloquent\Model;
-
- /**
- * LuModel
- *
- * @method static LuModel where($column, $operator = null, $value = null, $boolean = 'and')
- * @method static LuModel orWhere($column, $operator = null, $value = null)
- * @method static LuModel orderBy($column, $direction = 'asc')
- * @method static LuModel take($value)
- * @method static LuModel offset($value)
- * @method static LuModel rightJoin($table, $first, $operator = null, $second = null)
- * @method static LuModel leftJoin($table, $first, $operator = null, $second = null)
- * @method static LuModel join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false)
- * @method static LuModel groupBy(...$columns)
- * @method static LuModel[] get($columns = ['*'])
- * @method static LuModel first($columns = ['*'])
- * @method static LuModel find($id, $columns = ['*'])
- * @method static LuModel select($columns = ['*'])
- * @method static int count($columns = '*')
- */
- 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);
- }
|