芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/models/Payment.php
<?php namespace app\models; use Yii; /** * This is the model class for table "{{%payment}}". * * @property int $id * @property string|null $payment_type * @property string|null $amount * @property string|null $concept * @property int|null $customerlicense_id * @property string|null $payment_date * @property string|null $payment_method * @property string|null $payment_reference * @property string|null $validity_start_date * @property string|null $validity_end_date * @property int|null $sort_order * @property string|null $created * @property string|null $updated * @property int|null $trash * @property int|null $active * * @property CustomerLicense $customerlicense */ class Payment extends \yii\db\ActiveRecord { /** * {@inheritdoc} */ public static function tableName() { return '{{%payment}}'; } public function extraFields(){ return ['customerlicense']; } /** * {@inheritdoc} */ public function rules() { return [ [['amount','validity_start_date','validity_end_date'],'required'], [['customerlicense_id', 'sort_order', 'trash', 'active'], 'integer'], [['payment_date', 'validity_start_date', 'validity_end_date', 'created', 'updated'], 'safe'], [['payment_type', 'amount'], 'string', 'max' => 10], [['concept'], 'string', 'max' => 200], [['payment_method'], 'string', 'max' => 15], [['payment_reference'], 'string', 'max' => 100], [['customerlicense_id'], 'exist', 'skipOnError' => true, 'targetClass' => CustomerLicense::class, 'targetAttribute' => ['customerlicense_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'payment_type' => 'Payment Type', 'amount' => 'Amount', 'concept' => 'Concept', 'customerlicense_id' => 'Customerlicense ID', 'payment_date' => 'Payment Date', 'payment_method' => 'Payment Method', 'payment_reference' => 'Payment Reference', 'validity_start_date' => 'Validity Start Date', 'validity_end_date' => 'Validity End Date', 'sort_order' => 'Sort Order', 'created' => 'Created', 'updated' => 'Updated', 'trash' => 'Trash', 'active' => 'Active', ]; } /** * Gets query for [[Customerlicense]]. * * @return \yii\db\ActiveQuery */ public function getCustomerlicense() { return $this->hasOne(CustomerLicense::class, ['id' => 'customerlicense_id']); } }