| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "cyy_event_user".
- *
- * @property int $id
- * @property int|null $store_id 商城ID
- * @property int|null $created_at
- * @property int|null $updated_at
- * @property int|null $is_delete 是否删除:0=否;1=是;
- * @property int|null $event_id 活动ID
- * @property int|null $user_id 参会人用户ID
- * @property string|null $company_code 统一社会信息代码
- * @property string|null $company_name 公司名称
- * @property int|null $apply_status 审核状态:0=待审核;1=已通过;2=已驳回;
- * @property int|null $apply_time 审核时间
- * @property string|null $reason_refusal 拒绝原因
- * @property int|null $sign_time 首次签到时间
- * @property int|null $form_type 表单类型:1=企业;2=机构;
- */
- class EventUser extends \yii\db\ActiveRecord
- {
- const APPLY_PENDING = 0;
- const APPLY_APPROVED = 1;
- const APPLY_REJECTED = 2;
- public static function tableName()
- {
- return 'cyy_event_user';
- }
- public function behaviors()
- {
- return [
- [
- // 自动更新创建和更新时间
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- public function rules()
- {
- return [
- [['store_id', 'created_at', 'updated_at', 'event_id', 'user_id', 'apply_status', 'apply_time', 'sign_time', 'form_type', 'is_delete'], 'integer'],
- [['company_code', 'company_name', 'company_address', 'real_name', 'phone', 'identity_card', 'reason_refusal'], 'string', 'max' => 255],
- [['hotel', 'restaurant', 'itinerary'], 'string'],
- [['event_id', 'user_id', 'real_name', 'phone'], 'required'],
- [['apply_status'], 'in', 'range' => [self::APPLY_PENDING, self::APPLY_APPROVED, self::APPLY_REJECTED]],
- ];
- }
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => '商城ID',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'is_delete' => '是否删除',
- 'event_id' => '活动ID',
- 'user_id' => '用户ID',
- 'company_code' => '统一信用代码',
- 'company_name' => '公司名称',
- 'company_address' => '公司地址',
- 'real_name' => '姓名',
- 'phone' => '手机号',
- 'identity_card' => '身份证号',
- 'hotel' => '住宿信息',
- 'restaurant' => '餐食信息',
- 'itinerary' => '行程信息',
- 'apply_status' => '审核状态',
- 'apply_time' => '审核时间',
- 'reason_refusal' => '拒绝原因',
- 'sign_time' => '首次签到时间',
- 'form_type' => '表单类型:1=企业;2=机构;'
- ];
- }
- }
|