Skip to content

Instantly share code, notes, and snippets.

@mantonuk
Created January 28, 2011 21:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mantonuk/800960 to your computer and use it in GitHub Desktop.
Save mantonuk/800960 to your computer and use it in GitHub Desktop.
class Model_Comment extends Model_Table{
protected $entity_code='comments';
protected $table_alias='c';
protected function defineFields(){
$this->newField('id')
->datatype('int')
->caption('ID')
->system(true)
;
$this->newField('company_id')
->datatype('int')
;
$this->newField('status')
->datatype('int')
->visible(false)
;
$this->newField('email')
->datatype('string')
->caption('Email')
->required(true)
->length(255)
;
$this->newField('name')
->datatype('string')
->caption('Name')
->length(255)
->required(true)
;
$this->newField('phone')
->datatype('string')
->caption('Phone')
->length(255)
;
$this->newField('comment')
->datatype('text')
->caption('Description')
->length(255)
->required(true)
;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment