Blame view

common/models/CartBills.php 1.96 KB
f68e7edd   Mihail   add bills models,...
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
  <?php
  
  namespace common\models;
  
  use Yii;
  
  /**
   * This is the model class for table "{{%cart_bills}}".
   *
   * @property string $id
   * @property string $account_id
   * @property string $manager_id
   * @property string $office_id
   * @property string $status
   * @property string $f1
   * @property string $f2
   * @property string $f3
   * @property string $message
   * @property integer $safe_bill
   * @property string $delivery
   * @property double $delivery_price
   * @property string $timestamp
   */
  class CartBills extends \backend\components\base\BaseActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return '{{%cart_bills}}';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['account_id', 'office_id', 'f1', 'f2', 'f3', 'message', 'delivery'], 'required'],
              [['account_id', 'manager_id', 'office_id', 'status', 'safe_bill'], 'integer'],
              [['message'], 'string'],
              [['delivery_price'], 'number'],
              [['timestamp'], 'safe'],
              [['f1', 'f3'], 'string', 'max' => 150],
              [['f2'], 'string', 'max' => 50],
              [['delivery'], 'string', 'max' => 100]
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'id' => Yii::t('app', 'ID'),
              'account_id' => Yii::t('app', 'Account ID'),
              'manager_id' => Yii::t('app', 'Manager ID'),
              'office_id' => Yii::t('app', 'Office ID'),
              'status' => Yii::t('app', 'Status'),
              'f1' => Yii::t('app', 'F1'),
              'f2' => Yii::t('app', 'F2'),
              'f3' => Yii::t('app', 'F3'),
              'message' => Yii::t('app', 'Message'),
              'safe_bill' => Yii::t('app', 'Safe Bill'),
              'delivery' => Yii::t('app', 'Delivery'),
              'delivery_price' => Yii::t('app', 'Delivery Price'),
              'timestamp' => Yii::t('app', 'Timestamp'),
          ];
      }
  }