type Primary @model @auth(rules: [{ allow: public }]) {
  id: ID!
  relatedMany: [RelatedMany] @hasMany(references: "primaryId")
  relatedOne: RelatedOne @hasOne(references: "primaryId")
}

type RelatedMany @model @auth(rules: [{ allow: public }]) {
  id: ID!
  primaryId: String
  primary: Primary @belongsTo(references: ["primaryId"])
}

type RelatedOne @model @auth(rules: [{ allow: public }]) {
  id: ID!
  primaryId: String
  primary: Primary @belongsTo(references: ["primaryId"])
}
