Hi. I was wondering it it is possible to use same table for different Models.
I have a table called credits Table Structure:
Now I want to have 2 Models:
class Cast extends Model{
public function initialize(){
$this->setSource("credits");
// "credits" source but only where " credits.type = 'cast' "
// should only get columns: ['id', 'person_id', 'character', 'order']
}
}
class Crew extends Model{
public function initialize(){
$this->setSource("credits");
// "credits" source but only where " credits.type = 'crew' "
// should only get columns: ['id', 'person_id', 'job', 'department']
}
}