DocumentiCategorieTranslation.php 2.88 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php

namespace backend\models\translations;

use Yii;
use raoul2000\workflow\base\SimpleWorkflowBehavior;
use yii\helpers\ArrayHelper;

/**
* This is the base-model class for table "documenti_categorie__translation".
*
    * @property integer $documenti_categorie_id
    * @property string $language
    * @property string $titolo
    * @property string $sottotitolo
    * @property string $descrizione_breve
    * @property string $descrizione
    * @property string $status
    * @property integer $created_by
    * @property integer $updated_by
    * @property integer $deleted_by
    * @property string $created_at
    * @property string $updated_at
    * @property string $deleted_at
    *
            * @property \backend\models\translations\DocumentiCategorieTranslation $documentiCategorie
    */
class DocumentiCategorieTranslation extends \arter\amos\core\record\Record
{


    public $language_source;


/**
* @inheritdoc
*/
public static function tableName()
{
return 'documenti_categorie__translation';
}

/**
* @inheritdoc
*/
public function rules()
{
return [
            [['documenti_categorie_id', 'language'], 'required'],
            [['documenti_categorie_id', 'created_by', 'updated_by', 'deleted_by'], 'integer'],
            [['titolo', 'sottotitolo', 'descrizione_breve', 'descrizione'], 'string'],
            [['created_at', 'updated_at', 'deleted_at'], 'safe'],
            [['language', 'status'], 'string', 'max' => 255],
            [['documenti_categorie_id'], 'exist', 'skipOnError' => true, 'targetClass' => \arter\amos\documenti\models\DocumentiCategorie::className(), 'targetAttribute' => ['documenti_categorie_id' => 'id']],
 ['language_source', 'safe'],
];
}

/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'language_source' => \Yii::t('amostranslation', 'Select another source language'),
    'documenti_categorie_id' => Yii::t('amostranslation', 'Documenti Categorie ID'),
    'language' => Yii::t('amostranslation', 'Language'),
    'titolo' => Yii::t('amostranslation', 'Titolo'),
    'sottotitolo' => Yii::t('amostranslation', 'Sottotitolo'),
    'descrizione_breve' => Yii::t('amostranslation', 'Descrizione Breve'),
    'descrizione' => Yii::t('amostranslation', 'Descrizione'),
    'status' => Yii::t('amostranslation', 'Status'),
    'created_by' => Yii::t('amostranslation', 'Created By'),
    'updated_by' => Yii::t('amostranslation', 'Updated By'),
    'deleted_by' => Yii::t('amostranslation', 'Deleted By'),
    'created_at' => Yii::t('amostranslation', 'Created At'),
    'updated_at' => Yii::t('amostranslation', 'Updated At'),
    'deleted_at' => Yii::t('amostranslation', 'Deleted At'),
];
}

    /**
    * @return \yii\db\ActiveQuery
    */
    public function getDocumentiCategorie()
    {
    return $this->hasOne(\arter\amos\documenti\models\DocumentiCategorie::className(), ['id' => 'documenti_categorie_id']);
    }
}