| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "event_sign_log".
- *
- * @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 $staff_id 签到员ID
- * @property int|null $user_id 参会人用户ID
- * @property int|null $event_id 活动ID
- * @property int|null $event_user_id event_user表关联ID
- *
- * @property EventSignStaff $staff
- */
- class EventSignLog extends \yii\db\ActiveRecord
- {
- public static function tableName()
- {
- return 'cyy_event_sign_log';
- }
- public function behaviors()
- {
- return [
- [
- // 自动更新创建和更新时间
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- public function rules()
- {
- return [
- [['store_id', 'created_at', 'updated_at', 'is_delete', 'staff_id', 'user_id', 'event_id', 'event_user_id'], 'integer'],
- ];
- }
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => '商城ID',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'is_delete' => '是否删除',
- 'staff_id' => '签到员ID',
- 'user_id' => '参会人用户ID',
- 'event_id' => '活动ID',
- 'event_user_id' => 'event_user关联ID',
- ];
- }
- public function getStaff()
- {
- return $this->hasOne(EventSignStaff::class, ['id' => 'staff_id']);
- }
- }
|