| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\db\ActiveRecord;
- use yii\behaviors\TimestampBehavior;
- use Yii;
- /**
- * This is the model class for table "{{%verify_card_account}}".
- *
- * @property int $id
- * @property int $store_id
- * @property int $card_id 卡券id
- * @property string $account 账号
- * @property string $password 密码
- * @property int $status 状态,0=未使用,1=已使用
- * @property int $created_at 创建时间
- * @property int $updated_at 更新时间
- */
- class VerifyCardAccount extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%verify_card_account}}';
- }
- const STATUS_UNUSED = 0; // 未使用
- const STATUS_USED = 1; // 已使用
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
- ]
- ]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['store_id', 'card_id', 'account', 'password'], 'required'],
- [['store_id', 'card_id', 'status'], 'integer'],
- [['account', 'password'], 'string', 'max' => 60],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'card_id' => '卡券id',
- 'account' => '账号',
- 'password' => '密码',
- 'status' => '状态', // 0=未使用,1=已使用
- ];
- }
- }
|