This release adds comprehensive metadata support and fixes the duplicate performer issue. MAJOR FIXES: ✅ Duplicate Prevention - Added UNIQUE(source, source_id) constraint to performers table - ON CONFLICT DO UPDATE in performer store - No more duplicate Riley Reid entries! ✅ Comprehensive TPDB Metadata - Extended Performer model with ALL TPDB fields - Physical: height, weight, measurements, cup size, eye/hair color - Personal: birthday, astrology, birthplace, ethnicity, nationality - Body: tattoos, piercings, boob job status - Career: start/end years, active status - Added PerformerExtras nested struct for TPDB "extras" object - Parse weight/height strings ("49kg" -> 49, "160cm" -> 160) - Handle British spelling (hair_colour, eye_colour) ✅ Enriched Import - Auto-fetch full performer details via GetPerformerByID - Search results now enriched with complete metadata - UUID + numeric TPDB ID both stored ✅ Enhanced CLI Output - Formatted display with all available stats - Height shown in cm and feet/inches - Weight shown in kg and lbs - Organized sections (IDs, Personal, Physical, Bio, Media) - Beautiful separator bars TECHNICAL DETAILS: - Schema: 25+ new performer fields with proper types - Types: PerformerExtras struct for nested TPDB response - Mapper: String parsing for "160cm", "49kg" format - Store: Full field support in Create/Search/GetByID - Display: Conditional rendering of all available data TESTING: ✅ Riley Reid import: All 25+ fields populated correctly ✅ Duplicate prevention: Second import updates existing record ✅ Broad search ("riley"): Only 2 unique performers ✅ Data accuracy: Matches theporndb.net/performers/riley-reid Database now captures: - UUID: 26d101c0-1e23-4e1f-ac12-8c30e0e2f451 - TPDB ID: 83047 - Birthday: 1991-07-09 - Height: 160cm (5'3") - Weight: 49kg (108lb) - Measurements: 32A-24-34 - All tattoos, piercings, career info, and full bio 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
2.3 KiB
Go
50 lines
2.3 KiB
Go
package model
|
||
|
||
import "time"
|
||
|
||
// Performer represents a performer/actor in the database
|
||
type Performer struct {
|
||
ID int64 `json:"id"`
|
||
Name string `json:"name"`
|
||
Aliases string `json:"aliases,omitempty"` // comma-separated
|
||
|
||
// Physical attributes
|
||
Gender string `json:"gender,omitempty"` // male/female/trans/other
|
||
Birthday string `json:"birthday,omitempty"` // YYYY-MM-DD
|
||
Astrology string `json:"astrology,omitempty"` // zodiac sign
|
||
Birthplace string `json:"birthplace,omitempty"`
|
||
Ethnicity string `json:"ethnicity,omitempty"`
|
||
Nationality string `json:"nationality,omitempty"` // ISO country code
|
||
Country string `json:"country,omitempty"` // full country name
|
||
EyeColor string `json:"eye_color,omitempty"`
|
||
HairColor string `json:"hair_color,omitempty"`
|
||
Height int `json:"height,omitempty"` // cm
|
||
Weight int `json:"weight,omitempty"` // kg
|
||
Measurements string `json:"measurements,omitempty"` // e.g., "32A-24-34"
|
||
CupSize string `json:"cup_size,omitempty"` // e.g., "32A"
|
||
TattooDescription string `json:"tattoo_description,omitempty"`
|
||
PiercingDescription string `json:"piercing_description,omitempty"`
|
||
BoobJob string `json:"boob_job,omitempty"` // True/False as string
|
||
|
||
// Career information
|
||
Career string `json:"career,omitempty"` // e.g., "2010–2020"
|
||
CareerStartYear int `json:"career_start_year,omitempty"`
|
||
CareerEndYear int `json:"career_end_year,omitempty"`
|
||
DateOfDeath string `json:"date_of_death,omitempty"` // YYYY-MM-DD
|
||
Active bool `json:"active"`
|
||
|
||
// Media
|
||
ImagePath string `json:"image_path,omitempty"`
|
||
ImageURL string `json:"image_url,omitempty"`
|
||
PosterURL string `json:"poster_url,omitempty"`
|
||
Bio string `json:"bio,omitempty"`
|
||
|
||
// Source tracking
|
||
Source string `json:"source,omitempty"` // tpdb, ae, etc.
|
||
SourceID string `json:"source_id,omitempty"` // remote UUID
|
||
SourceNumericID int `json:"source_numeric_id,omitempty"` // TPDB numeric ID
|
||
|
||
CreatedAt time.Time `json:"created_at"`
|
||
UpdatedAt time.Time `json:"updated_at"`
|
||
}
|