EventSignLog.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. use yii\behaviors\TimestampBehavior;
  5. /**
  6. * This is the model class for table "event_sign_log".
  7. *
  8. * @property int $id
  9. * @property int|null $store_id 商城ID
  10. * @property int|null $created_at
  11. * @property int|null $updated_at
  12. * @property int|null $is_delete 是否删除:0=否;1=是;
  13. * @property int|null $staff_id 签到员ID
  14. * @property int|null $user_id 参会人用户ID
  15. * @property int|null $event_id 活动ID
  16. * @property int|null $event_user_id event_user表关联ID
  17. *
  18. * @property EventSignStaff $staff
  19. */
  20. class EventSignLog extends \yii\db\ActiveRecord
  21. {
  22. public static function tableName()
  23. {
  24. return 'cyy_event_sign_log';
  25. }
  26. public function behaviors()
  27. {
  28. return [
  29. [
  30. // 自动更新创建和更新时间
  31. 'class' => TimestampBehavior::class,
  32. 'value' => time()
  33. ]
  34. ];
  35. }
  36. public function rules()
  37. {
  38. return [
  39. [['store_id', 'created_at', 'updated_at', 'is_delete', 'staff_id', 'user_id', 'event_id', 'event_user_id'], 'integer'],
  40. ];
  41. }
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'id' => 'ID',
  46. 'store_id' => '商城ID',
  47. 'created_at' => '创建时间',
  48. 'updated_at' => '更新时间',
  49. 'is_delete' => '是否删除',
  50. 'staff_id' => '签到员ID',
  51. 'user_id' => '参会人用户ID',
  52. 'event_id' => '活动ID',
  53. 'event_user_id' => 'event_user关联ID',
  54. ];
  55. }
  56. public function getStaff()
  57. {
  58. return $this->hasOne(EventSignStaff::class, ['id' => 'staff_id']);
  59. }
  60. }