| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?php
- namespace frontend\models;
- use Yii;
- /**
- * This is the model class for table "bit_article".
- *
- * @property integer $id
- * @property string $create_date
- * @property string $modify_date
- * @property string $author
- * @property string $content
- * @property integer $down
- * @property integer $hits
- * @property string $image_path
- * @property boolean $is_publication
- * @property boolean $is_recommend
- * @property boolean $is_top
- * @property string $link_url
- * @property string $meta_description
- * @property string $meta_keywords
- * @property string $min_content
- * @property string $sub_title
- * @property string $title
- * @property integer $up
- * @property integer $article_category_id
- * @property string $createdatea
- * @property string $modifydatea
- * @property string $meta_imge
- */
- class Product extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'bit_product';
- }
- public static function getDb()
- {
- return Yii::$app->get('dbXcoq');
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['c_time','m_time','is_del'],'safe'],
- [['category_id','name','name1','name2','tradetype','tradecode','contract','deposit','commission','interest','min_amplitude','price','min_trade','max_trade','trade_time','trade_time1','trade_time2','settlement_time','settlement_time1','settlement_time2','limit_line','limit_line1','limit_line2','lock_deposit','lock_deposit1','lock_deposit2','unit','unit1','unit2'],'required'],
- [['name','name1','name2','tradecode'],'unique'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'category_id' => 'category_id',
- 'name' => 'name',
- 'name1' => 'name1',
- 'name2' => 'name2',
- 'tradetype' => 'tradetype',
- 'tradecode' => 'tradecode',
- 'contract' => 'contract',
- 'deposit' => 'deposit',
- 'commission' => 'commission',
- 'interest' => 'interest',
- 'min_amplitude' => 'min_amplitude',
- 'price' => 'price',
- 'min_trade' => 'min_trade',
- 'max_trade' => 'max_trade',
- 'trade_time' => 'trade_time',
- 'trade_time1' => 'trade_time1',
- 'trade_time2' => 'trade_time2',
- 'settlement_time' => 'settlement_time',
- 'settlement_time1' => 'settlement_time1',
- 'settlement_time2' => 'settlement_time2',
- 'limit_line' => 'limit_line',
- 'limit_line1' => 'limit_line1',
- 'limit_line2' => 'limit_line2',
- 'lock_deposit' => 'lock_deposit',
- 'lock_deposit1' => 'lock_deposit1',
- 'lock_deposit2' => 'lock_deposit2',
- 'unit' => 'unit',
- 'unit1' => 'unit1',
- 'unit2' => 'unit2',
- 'c_time' => 'c_time',
- 'm_time' => 'm_time',
- 'is_del' => 'is_del',
- ];
- }
- // 关联
- public function getCategory()
- {
- return $this->hasOne(ProductCategory::className(), ['id' => 'category_id']);
- }
-
- }
|