FirestoreでReference型のデータを扱う

Firestore には参照型が使えます。 firebase.DocumentReferencefirebase.CollectionReferenceを入れるといい感じになります。

const ref = await this.$firestore
  .collection('users')
  .doc("testUser")

await this.$firestore
  .collection('notes')
  .add({
    body: "test",
    user: ref,
    updatedAt: this.$firebase.firestore.FieldValue.serverTimestamp(),
  })