| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "event_sign_staff".
- *
- * @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 $user_id 签到员user_id,关联user表
- * @property string|null $mobile 手机号
- * @property string|null $name 姓名
- *
- * @property EventSignLog[] $signLogs
- */
- class EventSignStaff extends \yii\db\ActiveRecord
- {
- public static function tableName()
- {
- return 'cyy_event_sign_staff';
- }
- public function behaviors()
- {
- return [
- [
- // 自动更新创建和更新时间
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- public function rules()
- {
- return [
- [['store_id', 'created_at', 'updated_at', 'is_delete', 'user_id'], 'integer'],
- [['mobile'], 'string', 'max' => 20],
- [['name'], 'string', 'max' => 255],
- ];
- }
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => '商城ID',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'is_delete' => '是否删除',
- 'user_id' => '签到员用户ID',
- 'mobile' => '手机号',
- 'name' => '姓名',
- ];
- }
- public function getSignLogs()
- {
- return $this->hasMany(EventSignLog::class, ['staff_id' => 'id']);
- }
- }
|