创建待办事项表
现在,继续创建另一个模型: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
Build apps and APIs 10x faster
Built-in authorization and caching
8x more performant than hand-rolled APIs

