feat: Implement person and tag management services
- Added `Person` and `Tag` models to the core library. - Created `PersonService` and `TagService` traits with implementations for managing persons and tags. - Introduced repositories for `Person`, `Tag`, `FaceRegion`, and `PersonShare` with PostgreSQL support. - Updated authorization logic to include permissions for accessing and editing persons. - Enhanced the schema to support new models and relationships. - Implemented database migrations for new tables related to persons and tags. - Added request and response structures for API interactions with persons and tags.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
CREATE TYPE person_permission AS ENUM (
|
||||
'view',
|
||||
'can_use'
|
||||
);
|
||||
|
||||
CREATE TABLE person_shares (
|
||||
person_id UUID NOT NULL REFERENCES people (id) ON DELETE CASCADE,
|
||||
user_id UUID NOT NULL REFERENCES users (id) ON DELETE CASCADE,
|
||||
permission person_permission NOT NULL,
|
||||
PRIMARY KEY (person_id, user_id)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_person_shares_user_id ON person_shares (user_id);
|
||||
Reference in New Issue
Block a user