Skip to content

Database

Sergii Ivashchenko edited this page Jul 25, 2019 · 17 revisions

Database Schema

Adobe Stock User Profile

A table that is used to store Adobe stock user profile details used for personalization and access/refresh tokens to keep the admin user account connected to Adobe stock API.

Adobe Stock User Profile DB

Image Metadata Storage

In order to implement replace preview to licensed image functionality, we should store information about the uploaded image.

Consider storing as much information as possible to simplify further features development.

Database Schema

Fields details

Adobe Stock User Profile

adobe_stock_profile table

The table is populated based on data returned from Adobe authentication callback

Field Search Response Field Data Type Description
id N/A int primary key
adobe_id userId int
admin_user_id N/A int Foreign key admin_user.user_id
display_name displayName string
preferred_languages preferred_languages string json representation of array of languages
account_type account_type string
access_token access_token string
refresh_token refresh_token string
created_at N/A date
updated_at N/A date

Image Metadata Storage

adobe_stock_asset table

Field API Field Data Type Description
id N/A int primary key
media_type_id N/A int Foreign key adobe_stock_media_type.id
category_id N/A int Foreign key adobe_stock_category.id
creator_id creator_id int Foreign key adobe_stock_creator.id
premium_level_id N/A int Foreign key adobe_stock_premium_level.id
path N/A int Filesystem image path (relative to media directory root)
adobe_id id int Asset's unique identifier on adobe stock side
stock_id stock_id string
is_licensed is_licensed int Is image licensed and downloaded
title title string Asset's title
preview_url comp_url string URL to the watermarked version of the asset
preview_width comp_width int complementary (unlicensed) image pixels width
preview_height comp_height int complementary (unlicensed) image pixels height
width width int licensed width
height height int licensed height
url int licensed image url
country_name country_name string
details_url details_url string URL to the Adobe Stock details page for the asset. If you pass the Authorization header with the call, Adobe Stock generates an SSO jump URL
vector_type vector_type string|null "svg" or "zip" (ai/eps) for vector images
content_type content_type string Mime type of the asset's content.
creation_date creation_date string
created_at N/A string
updated_at N/A string

adobe_stock_category table

Field Search Response Field Data Type Description
id N/A int primary key
adobe_id category.id int
name category.name string

adobe_stock_asset_keyword table

Field Data Type Description
asset_id int Foreign key adobe_stock_asset.id
keyword_id int Foreign key adobe_stock_keyword.id

adobe_stock_keyword table

Field API Field Data Type Description
id N/A int primary key
keyword keywords string

adobe_stock_creator table

Field API Field Data Type Description
id N/A int primary key
adobe_id creator_id int
creator_name creator_name string Asset creator's name

adobe_stock_media_type table

Field API Field Data Type Description
id N/A int primary key
adobe_id media_type_id int adobe assets type
name name string assets type name

adobe_stock_premium_level table

Field API Field Data Type Description
id N/A int primary key
adobe_id premium_level_id int
name name string premium level name
Clone this wiki locally