| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?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 "{{%purchase}}".
- *
- * @property int $id
- * @property int $store_cloud_id 商户id
- * @property string $name 姓名
- * @property int $mobile 手机号
- * @property string $custom_data 自定义表单数据
- * @property int $saas_user_id 联盟用户id
- * @property int $status 状态
- * @property int $created_at 创建时间
- * @property int $updated_at 更新时间
- * @property int $is_delete 是否删除
- * @property integer $district_id
- * @property integer $city_id
- * @property integer $province_id
- */
- class Purchase extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%purchase}}';
- }
- 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_cloud_id', 'is_delete', 'created_at', 'updated_at', 'status', 'saas_user_id', 'district_id', 'city_id', 'province_id'], 'integer'],
- [['name', 'mobile', 'saas_user_id'], 'required'],
- [['name'], 'string', 'max' => 255],
- [['status'], 'default', 'value' => 0],
- [['custom_data'], 'string'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_cloud_id' => '商户id',
- 'name' => '充值名称',
- 'mobile' => '手机号',
- 'custom_data' => '自定义数据',
- 'saas_user_id' => '联盟用户id',
- 'created_at' => '添加时间',
- 'updated_at' => '更新时间',
- 'status' => '状态, 0:待审核, 1:已通过, 2:已拒绝',
- 'is_delete' => '是否删除',
- 'district_id' => '区',
- 'city_id' => '市',
- 'province_id' => '省',
- ];
- }
- }
|