Code Structure
Last updated
Was this helpful?
Last updated
Was this helpful?
Below, we'll show some Ent Framework usage examples. We will progress from the simplest code snippets to more and more advanced topics, like:
custom ID schemas
privacy rules
triggers
composite field types
Viewer Context flavors
master-replica and automatic replication lag tracking
microsharding and migrations
cross-shards foreign keys and inverse indexes
etc.
The examples in this tutorial will approximately follow src
folder structure:
ents/
cluster.sql
cluster.ts
EntComment.ts
EntTopic.ts
EntUser.ts
getServerVC.ts
app/
api/
auth/[...nextauth]
route.ts
topics/
route.ts