|
1 | 1 | input AMPLIFY {
|
2 | 2 | globalAuthRule: AuthRule = { allow: public }
|
3 | 3 | }
|
| 4 | + |
4 | 5 | type Blog @model {
|
5 | 6 | id: ID!
|
6 | 7 | name: String!
|
@@ -217,103 +218,130 @@ type MultiRelatedRegistration @model {
|
217 | 218 | attendee: MultiRelatedAttendee! @belongsTo(fields: ["attendeeId"])
|
218 | 219 | }
|
219 | 220 |
|
220 |
| -type CPKInventory @model { |
| 221 | +type CpkInventory @model { |
221 | 222 | productId: ID! @primaryKey(sortKeyFields: ["productName", "warehouseId"])
|
222 | 223 | productName: String!
|
223 | 224 | warehouseId: String!
|
224 | 225 | description: String
|
225 | 226 | }
|
226 | 227 |
|
227 |
| -# type CPKHasOneParent @model { |
228 |
| -# id: ID! @primaryKey(sortKeyFields: ["name"]) |
229 |
| -# name: String! |
230 |
| -# implicitChild: CPKHasOneChild @hasOne |
231 |
| -# explicitChildId: ID |
232 |
| -# explicitChildName: String |
233 |
| -# explicitChild: CPKHasOneChild |
234 |
| -# @hasOne(fields: ["explicitChildId", "explicitChildName"]) |
235 |
| -# } |
236 |
| - |
237 |
| -# type CPKHasOneChild @model { |
238 |
| -# id: ID! @primaryKey(sortKeyFields: ["name"]) |
239 |
| -# name: String! |
240 |
| -# } |
241 |
| - |
242 |
| -# type CPKBelongsToParent @model { |
243 |
| -# id: ID! @primaryKey(sortKeyFields: ["name"]) |
244 |
| -# name: String! |
245 |
| -# implicitChild: CPKBelongsToChildImplicit @hasOne |
246 |
| -# explicitChild: CPKBelongsToChildExplicit @hasOne |
247 |
| -# } |
248 |
| - |
249 |
| -# type CPKBelongsToChildImplicit @model { |
250 |
| -# id: ID! @primaryKey(sortKeyFields: ["name"]) |
251 |
| -# name: String! |
252 |
| -# parent: CPKHasOneParent @belongsTo |
253 |
| -# } |
254 |
| - |
255 |
| -# type CPKBelongsToChildExplicit @model { |
256 |
| -# id: ID! @primaryKey(sortKeyFields: ["name"]) |
257 |
| -# name: String! |
258 |
| -# parentId: ID! |
259 |
| -# parentName: String! |
260 |
| -# parent: CPKHasOneParent @belongsTo(fields: ["projectId", "projectName"]) |
261 |
| -# } |
262 |
| - |
263 |
| -# type CPKHasManyParent @model { |
264 |
| -# id: ID! @primaryKey(sortKeyFields: ["title"]) |
265 |
| -# title: String! |
266 |
| -# implicitChildren: [CPKHasManyChildImplicit] @hasMany |
267 |
| -# explicitChildren: [CPKHasManyChildExplicit] |
268 |
| -# @hasMany(indexName: "byCPKHasManyParent", fields: ["id"]) |
269 |
| -# } |
270 |
| - |
271 |
| -# type CPKHasManyChildImplicit @model { |
272 |
| -# id: ID! @primaryKey(sortKeyFields: ["content"]) |
273 |
| -# content: String! |
274 |
| -# } |
275 |
| - |
276 |
| -# type CPKHasManyChildExplicit @model { |
277 |
| -# id: ID! @primaryKey(sortKeyFields: ["content"]) |
278 |
| -# content: String! |
279 |
| -# hasManyParentId: ID |
280 |
| -# @index(name: "byCPKHasManyParent", sortKeyFields: ["content"]) |
281 |
| -# } |
282 |
| - |
283 |
| -# type CPKHasManyParentBidirectionalImplicit @model { |
284 |
| -# id: ID! @primaryKey(sortKeyFields: ["title"]) |
285 |
| -# title: String! |
286 |
| -# cpkHasManyImplicitChildren: [CPKHasManyChildImplicit] @hasMany |
287 |
| -# } |
288 |
| - |
289 |
| -# type CPKHasManyChildImplicit @model { |
290 |
| -# id: ID! @primaryKey(sortKeyFields: ["content"]) |
291 |
| -# content: String! |
292 |
| -# hasManyParent: CPKHasManyParentBidirectionalImplicit @belongsTo |
293 |
| -# } |
294 |
| - |
295 |
| -# type CPKHasManyParentBidirectionalExplicit @model { |
296 |
| -# id: ID! @primaryKey(sortKeyFields: ["title"]) |
297 |
| -# title: String! |
298 |
| -# cpkHasManyExplicitChildren: [CPKHasManyChildExplicit] @hasMany |
299 |
| -# } |
300 |
| - |
301 |
| -# type CPKHasManyChildExplicit @model { |
302 |
| -# id: ID! @primaryKey(sortKeyFields: ["content"]) |
303 |
| -# content: String! |
304 |
| -# hasManyParentId: ID @index(name: "byCPKHasManyParentBidirectionalExplicit", sortKeyFields: ["content"]) |
305 |
| -# hasManyParent: CPKHasManyParentBidirectionalImplicit @belongsTo(fields: ["hasManyParentID"]) |
306 |
| -# } |
307 |
| - |
308 |
| -# type CPKManyToManyPost @model { |
309 |
| -# id: ID! |
310 |
| -# title: String! |
311 |
| -# content: String |
312 |
| -# tags: [CPKManyToManyTag] @manyToMany(relationName: "CPKPostTags") |
313 |
| -# } |
314 |
| - |
315 |
| -# type CPKManyToManyTag @model { |
316 |
| -# id: ID! @primaryKey(sortKeyFields: ["label"]) |
317 |
| -# label: String! |
318 |
| -# posts: [CPKManyToManyPost] @manyToMany(relationName: "CPKPostTags") |
319 |
| -# } |
| 228 | +type CpkHasOneUnidirectionalParent @model { |
| 229 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 230 | + name: String! |
| 231 | + implicitChild: CpkHasOneUnidirectionalChild @hasOne |
| 232 | + explicitChildID: ID |
| 233 | + explicitChildName: String |
| 234 | + explicitChild: CpkHasOneUnidirectionalChild |
| 235 | + @hasOne(fields: ["explicitChildID", "explicitChildName"]) |
| 236 | +} |
| 237 | + |
| 238 | +type CpkHasOneUnidirectionalChild @model { |
| 239 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 240 | + name: String! |
| 241 | +} |
| 242 | + |
| 243 | +type CpkOneToOneBidirectionalParentCD @model { |
| 244 | + customId: ID! @primaryKey(sortKeyFields: ["name"]) |
| 245 | + name: String! |
| 246 | + implicitChild: CpkOneToOneBidirectionalChildImplicitCD @hasOne |
| 247 | + explicitChild: CpkOneToOneBidirectionalChildExplicitCD @hasOne |
| 248 | +} |
| 249 | + |
| 250 | +type CpkOneToOneBidirectionalChildImplicitCD @model { |
| 251 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 252 | + name: String! |
| 253 | + belongsToParent: CpkOneToOneBidirectionalParentCD @belongsTo |
| 254 | +} |
| 255 | + |
| 256 | +type CpkOneToOneBidirectionalChildExplicitCD @model { |
| 257 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 258 | + name: String! |
| 259 | + belongsToParentID: ID |
| 260 | + belongsToParentName: String |
| 261 | + belongsToParent: CpkOneToOneBidirectionalParentCD |
| 262 | + @belongsTo(fields: ["belongsToParentID", "belongsToParentName"]) |
| 263 | +} |
| 264 | + |
| 265 | +type CpkOneToOneBidirectionalParentID @model { |
| 266 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 267 | + name: String! |
| 268 | + implicitChild: CpkOneToOneBidirectionalChildImplicitID @hasOne |
| 269 | + explicitChild: CpkOneToOneBidirectionalChildExplicitID @hasOne |
| 270 | +} |
| 271 | + |
| 272 | +type CpkOneToOneBidirectionalChildImplicitID @model { |
| 273 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 274 | + name: String! |
| 275 | + belongsToParent: CpkOneToOneBidirectionalParentID @belongsTo |
| 276 | +} |
| 277 | + |
| 278 | +type CpkOneToOneBidirectionalChildExplicitID @model { |
| 279 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 280 | + name: String! |
| 281 | + belongsToParentID: ID |
| 282 | + belongsToParentName: String |
| 283 | + belongsToParent: CpkOneToOneBidirectionalParentID |
| 284 | + @belongsTo(fields: ["belongsToParentID", "belongsToParentName"]) |
| 285 | +} |
| 286 | + |
| 287 | +type CpkHasManyUnidirectionalParent @model { |
| 288 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 289 | + name: String! |
| 290 | + implicitChildren: [CpkHasManyUnidirectionalChildImplicit] @hasMany |
| 291 | + explicitChildren: [CpkHasManyUnidirectionalChildExplicit] |
| 292 | + @hasMany(indexName: "byHasManyParentCpk", fields: ["id", "name"]) |
| 293 | +} |
| 294 | + |
| 295 | +type CpkHasManyUnidirectionalChildImplicit @model { |
| 296 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 297 | + name: String! |
| 298 | +} |
| 299 | + |
| 300 | +type CpkHasManyUnidirectionalChildExplicit @model { |
| 301 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 302 | + name: String! |
| 303 | + hasManyParentID: ID! |
| 304 | + @index(name: "byHasManyParentCpk", sortKeyFields: ["hasManyParentName"]) |
| 305 | + hasManyParentName: String! |
| 306 | +} |
| 307 | + |
| 308 | +type CpkHasManyParentBidirectionalImplicit @model { |
| 309 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 310 | + name: String! |
| 311 | + bidirectionalImplicitChildren: [CpkHasManyChildBidirectionalImplicit] @hasMany |
| 312 | +} |
| 313 | + |
| 314 | +type CpkHasManyChildBidirectionalImplicit @model { |
| 315 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 316 | + name: String! |
| 317 | + hasManyParent: CpkHasManyParentBidirectionalImplicit @belongsTo |
| 318 | +} |
| 319 | + |
| 320 | +type CpkHasManyParentBidirectionalExplicit @model { |
| 321 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 322 | + name: String! |
| 323 | + bidirectionalExplicitChildren: [CpkHasManyChildBidirectionalExplicit] |
| 324 | + @hasMany(indexName: "byHasManyParent", fields: ["id", "name"]) |
| 325 | +} |
| 326 | + |
| 327 | +type CpkHasManyChildBidirectionalExplicit @model { |
| 328 | + id: ID! @primaryKey(sortKeyFields: ["name"]) |
| 329 | + name: String! |
| 330 | + hasManyParentID: ID! |
| 331 | + @index(name: "byHasManyParent", sortKeyFields: ["hasManyParentName"]) |
| 332 | + hasManyParentName: String! |
| 333 | + hasManyParent: CpkHasManyParentBidirectionalExplicit |
| 334 | + @belongsTo(fields: ["hasManyParentID", "hasManyParentName"]) |
| 335 | +} |
| 336 | + |
| 337 | +type CpkManyToManyPost @model { |
| 338 | + id: ID! |
| 339 | + title: String! |
| 340 | + tags: [CpkManyToManyTag] @manyToMany(relationName: "CpkPostTags") |
| 341 | +} |
| 342 | + |
| 343 | +type CpkManyToManyTag @model { |
| 344 | + id: ID! @primaryKey(sortKeyFields: ["label"]) |
| 345 | + label: String! |
| 346 | + posts: [CpkManyToManyPost] @manyToMany(relationName: "CpkPostTags") |
| 347 | +} |
0 commit comments