97 lines
3.1 KiB
Go
97 lines
3.1 KiB
Go
|
|
package models
|
||
|
|
|
||
|
|
type User struct {
|
||
|
|
ID uint `json:"id" gorm:"primaryKey"`
|
||
|
|
Username string `json:"username" gorm:"size:255"`
|
||
|
|
Name string `json:"name" gorm:"size:100"`
|
||
|
|
Email string `json:"email" gorm:"unique"`
|
||
|
|
Password string `json:"password" gorm:"size:255"`
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
type PathDownload struct{
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
Path string `db:"path"`
|
||
|
|
PathName string `db:"path_name"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type Files struct {
|
||
|
|
ID uint `gorm:"primaryKey"`
|
||
|
|
Name string `gorm:"size:255"`
|
||
|
|
Comment string `gorm:"type:text"`
|
||
|
|
Path string `gorm:"type:text"`
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
type LibrarySection struct {
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
Name string `db:"name"`
|
||
|
|
SectionType int64 `db:"section_type"`
|
||
|
|
Language string `db:"language"`
|
||
|
|
UUID string `db:"uuid"`
|
||
|
|
CreatedAt string `db:"created_at"`
|
||
|
|
UpdatedAt string `db:"updated_at"`
|
||
|
|
}
|
||
|
|
type SectionLocation struct {
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
LibrarySectionID int64 `db:"library_section_id"`
|
||
|
|
RootPath string `db:"root_path"`
|
||
|
|
CreatedAt string `db:"created_at"`
|
||
|
|
UpdatedAt string `db:"updated_at"`
|
||
|
|
}
|
||
|
|
type MetadataItem struct {
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
LibrarySectionID int64 `db:"library_section_id"`
|
||
|
|
ParentID int64 `db:"parent_id"`
|
||
|
|
MetadataType int64 `db:"metadata_type"`
|
||
|
|
GUID string `db:"guid"`
|
||
|
|
Title string `db:"title"`
|
||
|
|
TitleSort string `db:"title_sort"`
|
||
|
|
OriginalTitle string `db:"original_title"`
|
||
|
|
Studio string `db:"studio"`
|
||
|
|
Rating float64 `db:"rating"`
|
||
|
|
ContentRating string `db:"content_rating"`
|
||
|
|
Tagline string `db:"tagline"`
|
||
|
|
Summary string `db:"summary"`
|
||
|
|
Index int64 `db:"index"`
|
||
|
|
Duration int64 `db:"duration"`
|
||
|
|
ReleaseDate string `db:"release_date"`
|
||
|
|
CreatedAt string `db:"created_at"`
|
||
|
|
UpdatedAt string `db:"updated_at"`
|
||
|
|
UserThumbURL string `db:"user_thumb_url"`
|
||
|
|
}
|
||
|
|
type MediaItem struct {
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
MetadataItemID int64 `db:"metadata_item_id"`
|
||
|
|
Duration int64 `db:"duration"`
|
||
|
|
Bitrate int64 `db:"bitrate"`
|
||
|
|
Width int64 `db:"width"`
|
||
|
|
Height int64 `db:"height"`
|
||
|
|
AspectRatio float64 `db:"aspect_ratio"`
|
||
|
|
AudioCodec string `db:"audio_codec"`
|
||
|
|
VideoCodec string `db:"video_codec"`
|
||
|
|
Container string `db:"container"`
|
||
|
|
CreatedAt string `db:"created_at"`
|
||
|
|
UpdatedAt string `db:"updated_at"`
|
||
|
|
}
|
||
|
|
type MediaPart struct {
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
MediaItemID int64 `db:"media_item_id"`
|
||
|
|
File string `db:"file"`
|
||
|
|
Duration int64 `db:"duration"`
|
||
|
|
Size int64 `db:"size"`
|
||
|
|
Indexes string `db:"indexes"`
|
||
|
|
CreatedAt string `db:"created_at"`
|
||
|
|
UpdatedAt string `db:"updated_at"`
|
||
|
|
}
|
||
|
|
type Tag struct {
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
Tag string `db:"tag"`
|
||
|
|
TagType int64 `db:"tag_type"`
|
||
|
|
}
|
||
|
|
type Tagging struct {
|
||
|
|
ID int64 `db:"id"`
|
||
|
|
MetadataItemID int64 `db:"metadata_item_id"`
|
||
|
|
TagID int64 `db:"tag_id"`
|
||
|
|
Index int64 `db:"index"`
|
||
|
|
}
|