[self::TYPE_QUESTIONARY_CHANGED, self::TYPE_INDIVIDUAL_ACH_CHANGED, self::TYPE_EXAM_CHANGED, self::TYPE_EDUCATION_CHANGED, self::TYPE_SPECIALITY_CHANGED, self::TYPE_DORMITORY_CHANGED, self::TYPE_NOT_KLADR, self::TYPE_AGREEMENT_CHANGED, self::TYPE_PARENT_DATA_CHANGED]], ]; } public function attributeLabels() { return [ 'application_id' => 'Заявление', 'type' => 'Тип', ]; } public function getApplication() { return $this->hasOne(BachelorApplication::class, ['id' => 'application_id']); } public function getTypeName() { $names = static::historyTypeNames(); return $names[$this->type] ?? ''; } public static function historyTypeNames(): array { return [ static::TYPE_QUESTIONARY_CHANGED => 'Анкета', static::TYPE_INDIVIDUAL_ACH_CHANGED => 'Индивидуальные достижения', static::TYPE_EXAM_CHANGED => 'Экзамены', static::TYPE_EDUCATION_CHANGED => 'Образование', static::TYPE_SPECIALITY_CHANGED => 'Направления подготовки', static::TYPE_DORMITORY_CHANGED => 'Запись в общежитие', static::TYPE_NOT_KLADR => 'Не заполнено по КЛАДР', static::TYPE_AGREEMENT_CHANGED => 'Согласия на зачисление', static::TYPE_PARENT_DATA_CHANGED => 'Данные родителей или законных представителей', ]; } public function getIgnoredOnCopyingAttributes(): array { return [ 'id', 'updated_at' ]; } }