mmvergara / supadart

Typesafe queries in Supabase Flutter! Generate Flutter / Dart 🎯 classes from your Supabase schema.
https://supadart.vercel.app
MIT License
43 stars 5 forks source link

Support customize table to model class mappings #49

Closed bookshiyi closed 3 months ago

bookshiyi commented 3 months ago

We can use it like this:

Add supadart field to pubspec.yaml file(default):

supadart:
  # Required, your supabase server url
  supabase_url: https://xxx.supabase.co
  # Required, your supabase anon key
  supabase_anon_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  # Optional, where to place the generated classes files
  output: lib/models/
  # Optional, if you want to generate seperate files for each classes
  seperated: true
  # Optional, if you are not using Flutter, just normal Dart project
  flutter: true
  # Optional, used to map table names to class names(case-sensitive)
  mappings:
    books: book
    categories: category
    children: child
    people: person

related to issue #37

btw:Have a good weekend~

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
supabase-schema-dart-class-generator ❌ Failed (Inspect) Aug 4, 2024 3:11am
mmvergara commented 3 months ago

https://github.com/mmvergara/supadart/issues/37#issuecomment-2265216879

bookshiyi commented 3 months ago

Hi @mmvergara , the branch has been updated, please review it 😊

mmvergara commented 3 months ago

LGTM Thanks again for your efforts! <3