Logo white

Alex Savenko / analytics

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • analytics
  • app
  • library
  • App
  • Model
  • Album.php
  • initialize
    15479603
    Alex Savenko authored
    2017-02-03 11:43:01 -0500  
    Browse Code ยป
Album.php 480 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?php

namespace App\Model;

class Album extends \App\Mvc\DateTrackingModel
{
    public $id;
    public $title;

    public function getSource()
    {
        return 'album';
    }

    public function columnMap()
    {
        return parent::columnMap() + [
            'id' => 'id',
            'title' => 'title'
        ];
    }

    public function initialize() {

        $this->hasMany('id', Photo::class, 'albumId', [
            'alias' => 'Photos',
        ]);
    }
}