Sign up for Hasura Newsletter
Loading...

创建待办事项表

现在,继续创建另一个模型:todos

todos表将包含以下列:

  • id(输入整数(自动增量))、
  • title(输入文本)、
  • is_completed(输入布尔值并默认为 false)
  • is_public(输入布尔值并默认为 false)
  • created_at(输入时间戳和默认值 now())
  • user_id(输入文本)

这些列与待办事项的属性关联。

请务必要将 id 列设为主关键字。

在 Hasura 控制台中,转到DATA选项卡部分,然后单击Create Table。输入用于创建上述表的值。

创建表用户

完成后,请单击Add Table按钮,以创建表。

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin