Skip to content

Instantly share code, notes, and snippets.

@cpierce
Created January 12, 2015 03:26
Show Gist options
  • Save cpierce/f1148bb6f7828638dbef to your computer and use it in GitHub Desktop.
Save cpierce/f1148bb6f7828638dbef to your computer and use it in GitHub Desktop.
<?php
App::uses('AppModel', 'Model');
/**
* Sponsor.php Model
*
* @author Chris Pierce <cpierce@csdurant.com>
*/
class Sponsor extends AppModel {
/**
* Model Name
*
* @var string
*/
public $name = 'Sponsor';
/**
* Display Field
*
* @var string
*/
public $displayField = 'Sponsor';
/**
* Primary Key
*
* @var string
*/
public $primaryKey = 'SponsorID';
/**
* Has Many Relationship
*
* @var mixed[mixed]
*/
public $hasMany = [
'SponsorDivisions' => array(
'className' => 'SponsorDivision',
'foreignKey' => 'SponsorID',
'dependent' => true,
),
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment