avatar_assets table
The avatar_assets table in the Reddit Clone Database Schema schema has 8 columns, keyed by id. 1 column in user_avatar_items references it.
The avatar wardrobe. slot is what stops two hats being worn at once, and it is an enum because the render pipeline has a fixed layer order.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| name | varchar(100) | not null | |
| slot | avatar_slot | not null | |
| rarity | avatar_rarity | not null | |
| collection_name | varchar(100) | ||
| image_url | varchar(500) | not null | |
| is_premium_only | boolean | not null | |
| coin_price | integer |
Indexes (2)
(slot, rarity)(collection_name)
Relationships
user_avatar_items.asset_idreferencesavatar_assets