| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- namespace addons\SmartForm\common\models;
- use common\models\user\User;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_smart_form_sms_notice".
- *
- * @property int $id
- * @property int|null $status 状态[0:禁用;1:启用,2:已过期]
- * @property int $created_at 添加时间
- * @property int $updated_at
- * @property int $mall_id
- * @property int $user_id 发送号码
- * @property string $content 发送内容
- * @property string $template_id 发送内容
- * @property int $send_at 发送时间
- * @property string|null $send_var 发送变量
- * @property int $send_status 0待发送,2发送中,50发送失败,100发送成功
- * @property int $column_id 0待发送,2发送中,50发送失败,100发送成功
- * @property array|null $send_res 发送结果
- * @property int $user_form_id 发送结果
- * @property int $goods_id 发送结果
- * @property int $order_id 发送结果
- */
- class AddonsStartFormSmsNotice extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_smart_form_sms_notice';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['status', 'created_at', 'updated_at', 'mall_id', 'send_at', 'send_status', 'user_id',
- 'column_id', 'user_form_id', 'goods_id', 'order_id'], 'integer'],
- [['send_var', 'send_res'], 'safe'],
- [['content'], 'string', 'max' => 255],
- [['template_id'], 'string', 'max' => 50],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'status' => 'Status',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- 'mall_id' => 'Mall ID',
- 'mobile' => 'Mobile',
- 'content' => 'Content',
- 'send_at' => 'Send At',
- 'send_var' => 'Send Var',
- 'send_status' => 'Send Status',
- 'send_res' => 'Send Res',
- ];
- }
- public function getUser()
- {
- return $this->hasOne(User::class, ['id' => 'user_id'])->select('id, mobile, username, nickname, area_code');
- }
- public function getUserForm()
- {
- return $this->hasOne(AddonsSmartFormTemplateUserForm::class, ['id' => 'user_form_id']);
- }
- }
|