input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } type FileMeta { name: String! } type S3Object { bucket: String! region: String! key: String! meta: FileMeta } type Blog @model { id: ID! @primaryKey name: String! createdAt: AWSDateTime file: S3Object files: [S3Object] posts: [Post] @hasMany(indexName: "byBlog", fields: ["id"]) } type Post @model { id: ID! title: String! rating: Int! created: AWSDateTime likeCount: Int blogID: ID! @index(name: "byBlog") blog: Blog @belongsTo(fields: ["blogID"]) comments: [Comment] @hasMany(indexName: "byPost", fields: ["id"]) } type Comment @model { id: ID! postID: ID! @index(name: "byPost", sortKeyFields: ["content"]) post: Post @belongsTo(fields: ["postID"]) content: String! } type PostWithAuthRules @model @auth( rules: [ { allow: owner ownerField: "owner" operations: [create, update, delete, read] } ] ) { id: ID! title: String! owner: String } type Address { line1: String! line2: String city: String! state: String! postalCode: String! } type Person @model { id: ID! name: String! propertiesAddresses: [Address] contact: Contact! } type Phone { country: String! number: String! } type Contact { email: String! phone: Phone! mailingAddresses: [Address] } type Product @model { productID: ID! @primaryKey name: String! amount: Int! } type Inventory @model { productID: String! @primaryKey(sortKeyFields: ["name", "warehouseID", "region"]) name: String! warehouseID: ID! region: String! } type Warehouse @model { id: ID! @primaryKey(sortKeyFields: ["name", "region"]) name: String! region: String! } type StringListTypeModel @model { id: ID! value: [String] }