示例#1
0
 /**
  * @return ActiveQuery
  */
 public function getFiz_lico_rel()
 {
     return $this->hasOne(FizLico::className(), ['id' => 'fiz_lico'])->inverseOf('raboty_fiz_lica_rel');
 }
 public function init()
 {
     parent::init();
     $this->modules = ['raspisanie' => RaspisanieModule::className(), 'potok' => PotokModule::className()];
     $this->activeRelationMap = [\app\records\FizLico::className() => FizLico::className(), \app\records\Kurs::className() => Kurs::className(), \app\records\RabotaFizLica::className() => RabotaFizLica::className()];
 }
示例#3
0
文件: Kurs.php 项目: tsyrya/mybriop
 /**
  * @return ActiveQuery
  */
 public function getFiz_lica_rel()
 {
     return $this->hasMany(FizLico::className(), ['id' => 'fiz_lico'])->viaTable('kurs_fiz_lica', ['kurs' => 'id']);
 }
示例#4
0
 /**
  * @return ActiveQuery
  */
 public function getPrepodavatel_rel()
 {
     return $this->hasOne(FizLico::className(), ['id' => 'prepodavatel']);
 }
示例#5
0
 public function rules()
 {
     return [['kategorii_slushatelej', 'required'], ['kategorii_slushatelej', 'each', 'rule' => ['integer', 'min' => 1]], ['kategorii_slushatelej_input', 'filter', 'filter' => $this->emptyRemover()], ['kategorii_slushatelej_input', 'each', 'rule' => [SqueezeLineFilter::className()]], ['kategorii_slushatelej_input', 'each', 'rule' => [NazvanieValidator::className()]], ['nazvanie', 'required'], ['nazvanie', SqueezeLineFilter::className()], ['nazvanie', NazvanieValidator::className()], ['annotaciya', SqueezeTextFilter::className()], ['annotaciya', 'default'], ['raschitano_chasov', 'required'], ['raschitano_chasov', ChasyObucheniyaValidator::className()], ['formy_obucheniya_widget', 'each', 'rule' => [Enum2Validator::className(), 'enum' => FormaObucheniya::className()]], ['formy_obucheniya_widget', 'default'], ['ochnoe_nachalo', DateValidator::className(), 'timestampAttribute' => 'ochnoe_nachalo'], ['ochnoe_konec', DateValidator::className(), 'timestampAttribute' => 'ochnoe_konec'], ['zaochnoe_nachalo', DateValidator::className(), 'timestampAttribute' => 'zaochnoe_nachalo'], ['zaochnoe_konec', DateValidator::className(), 'timestampAttribute' => 'zaochnoe_konec'], [['ochnoe_nachalo', 'ochnoe_konec', 'zaochnoe_nachalo', 'zaochnoe_konec'], 'default'], ['raschitano_slushatelej', 'integer', 'min' => 0], ['raschitano_slushatelej', 'default'], ['rukovoditel', 'exist', 'targetClass' => FizLico::className(), 'targetAttribute' => 'id'], ['rukovoditel', 'default'], ['finansirovanie', 'required'], ['finansirovanie', Enum2Validator::className(), 'enum' => TipFinansirovaniya::className()], ['tip', 'required'], ['tip', Enum2Validator::className(), 'enum' => TipKursa::className()], ['plan_prospekt_god', 'required'], ['plan_prospekt_god', 'in', 'range' => ['2015-01-01', '2016-01-01', '2017-01-01', '2018-01-01']], ['iup', 'boolean'], ['iup', 'default', 'value' => false]];
 }