12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace app\models\entity;
- /**
- * This is the model class for table "device_transaction_log".
- *
- * @property int $id
- * @property int $employee
- * @property int $tmc
- * @property string $issue_date
- * @property string $receipt_date
- * @property string $note
- */
- class Log extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'device_transaction_log';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['employee', 'tmc'], 'required'],
- [['employee', 'tmc'], 'integer'],
- // [['employee', 'tmc'], 'safe'],
- [['issue_date', 'receipt_date'], 'string', 'max' => 255],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'employee' => 'Employee ID',
- 'tmc' => 'TMC ID',
- 'issue_date' => 'Date of Issue',
- 'receipt_date' => 'Date of receipt',
- ];
- }
- /**
- * @return \yii\db\ActiveQuery
- */
- public function getEmployee()
- {
- return $this->hasOne(Accounts::class, ['id' => 'employee']);
- }
- /**
- * @return \yii\db\ActiveQuery
- */
- public function getTmc()
- {
- return $this->hasOne(Tmc::class, ['id' => 'tmc']);
- }
- }
|