Create AddFeed dto, add validation and sqlx

This commit is contained in:
2024-05-04 13:24:08 +02:00
parent 32acf07d9a
commit e127360ecf
9 changed files with 136 additions and 42 deletions
+4 -4
View File
@@ -2,13 +2,13 @@ create table if not exists users(
id uuid not null primary key,
name text not null,
password varchar(100) not null,
email text not null
email text not null unique
);
create table if not exists feeds(
id uuid not null primary key,
name text not null,
link text not null,
link text not null unique,
favicon_url text not null,
tags text[] not null,
submitter_id uuid not null references users(id)
@@ -16,7 +16,7 @@ create table if not exists feeds(
create table if not exists entries(
id uuid not null primary key,
feed_id uuid not null references feed(id),
feed_id uuid not null references feeds(id),
title text not null,
link text not null,
date timestamp with time zone not null,
@@ -31,6 +31,6 @@ create table if not exists entries_users(
is_bookmarked bool not null,
is_read_later bool not null,
is_ignored bool not null,
constraint entries_users_pk primary keys(user_id, feed_id)
constraint entries_users_pk primary key(user_id, feed_id)
);