| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "cyy_event".
- *
- * @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 $start_time 开始时间
- * @property int|null $end_time 结束时间
- * @property int|null $attendance 公司参会人数限制;0=不限制
- * @property string|null $company_form 企业报名表单json
- * @property string|null $institution_form 机构报名表单json
- * @property string|null $cover_pic 活动封面图
- */
- class Event extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'cyy_event';
- }
- public function behaviors()
- {
- return [
- [
- // 自动更新创建和更新时间
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['id', 'store_id', 'created_at', 'updated_at', 'is_delete', 'start_time', 'end_time', 'attendance'], 'integer'],
- [['name', 'address', 'company_form', 'institution_form'], 'string'],
- [['id'], 'unique'], // 主键唯一性
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => '商城ID',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'is_delete' => '是否删除:0=否;1=是;',
- 'name' => '活动名称',
- 'address' => '活动地址',
- 'start_time' => '开始时间',
- 'end_time' => '结束时间',
- 'attendance' => '参会人数限制',
- 'company_form' => '企业报名表单(JSON)',
- 'institution_form' => '机构报名表单(JSON)',
- 'cover_pic' => '封面图',
- ];
- }
- }
|