示例#1
0
 function init()
 {
     parent::init();
     $this->addField('days_worked')->system(true)->datatype('int');
     $this->addField('salary')->mandatory(true)->datatype('money');
     $this->addField('money_owed')->caption('Owed')->calculated(true);
 }
示例#2
0
文件: Model_Male.php 项目: atk4/data
 public function init()
 {
     parent::init();
     $this->addCondition('gender', 'M');
 }
示例#3
0
文件: mongo2.php 项目: TigerBui/atk4
 function init()
 {
     parent::init();
     $this->hasOne('Mother');
     $this->hasMany('Books');
 }
示例#4
0
 function init()
 {
     parent::init();
     $this->addField('days_worked')->system(true)->datatype('int');
     $this->addField('salary')->mandatory('Salary is required')->datatype('money');
 }