Giter Club home page Giter Club logo

telehumpter's Introduction

telehumpter

Недо-пародия на твиттер на Supabase+Vue.

Технологии

Схема Supabase

Схема posts

create table
  public.posts (
    id bigint generated by default as identity not null,
    created_at timestamp with time zone null default now(),
    content text not null default ''::text,
    authorId uuid not null,
    constraint posts_pkey primary key (id),
    constraint posts_authorId_fkey foreign key ("authorId") references profiles (id) on delete cascade
  ) tablespace pg_default;

Схема profiles

create table
  public.profiles (
    id uuid not null,
    username text not null,
    constraint profiles_pkey primary key (id),
    constraint profiles_username_key unique (username),
    constraint profiles_id_fkey foreign key (id) references auth.users (id) on delete cascade
  ) tablespace pg_default;

Права

Права posts

Операция Права
INSERT All users can create posts.
SELECT All users can view posts.
INSERT Individuals can create posts.
DELETE Individuals can delete their own posts.
UPDATE Individuals can update their own posts.

Права profiles

Операция Права
INSERT All users can create profiles.
SELECT All users can view profiles.
UPDATE Individuals can update their own profiles.

Генерация типов из БД

Авторизуйтесь:

npx supabase login

Сгенерируйте типы:

npx supabase gen types typescript --project-id АЙДИ_ПРОЕКТА --schema public > src/types/supabase.ts

telehumpter's People

Contributors

seryibaran avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.