tercul-backend/models/psychological.go
Damir Mukimov 4957117cb6 Initial commit: Tercul Go project with comprehensive architecture
- Core Go application with GraphQL API using gqlgen
- Comprehensive data models for literary works, authors, translations
- Repository pattern with caching layer
- Authentication and authorization system
- Linguistics analysis capabilities with multiple adapters
- Vector search integration with Weaviate
- Docker containerization support
- Python data migration and analysis scripts
- Clean architecture with proper separation of concerns
- Production-ready configuration and middleware
- Proper .gitignore excluding vendor/, database files, and build artifacts
2025-08-13 07:42:32 +02:00

35 lines
1.0 KiB
Go

package models
// Emotion represents an emotion associated with a work
type Emotion struct {
BaseModel
Name string `gorm:"size:100;not null"`
Description string `gorm:"type:text"`
Language string `gorm:"size:50;not null"`
Intensity float64 `gorm:"type:decimal(5,2);default:0.0"`
UserID *uint
User *User `gorm:"foreignKey:UserID"`
WorkID *uint
Work *Work `gorm:"foreignKey:WorkID"`
CollectionID *uint
Collection *Collection `gorm:"foreignKey:CollectionID"`
}
// Mood represents a mood associated with a work
type Mood struct {
BaseModel
Name string `gorm:"size:100;not null"`
Description string `gorm:"type:text"`
Language string `gorm:"size:50;not null"`
Works []*Work `gorm:"many2many:work_moods"`
}
// TopicCluster represents a cluster of related topics
type TopicCluster struct {
BaseModel
Name string `gorm:"size:100;not null"`
Description string `gorm:"type:text"`
Keywords string `gorm:"type:text"`
Works []*Work `gorm:"many2many:work_topic_clusters"`
}