mirror of
https://github.com/simon-ding/polaris.git
synced 2026-04-21 19:27:30 +08:00
first draft version
This commit is contained in:
30
ent/schema/downloadclients.go
Normal file
30
ent/schema/downloadclients.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// DownloadClients holds the schema definition for the DownloadClients entity.
|
||||
type DownloadClients struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the DownloadClients.
|
||||
func (DownloadClients) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Bool("enable"),
|
||||
field.String("name"),
|
||||
field.String("implementation"),
|
||||
field.String("settings"),
|
||||
field.String("priority"),
|
||||
field.Bool("remove_completed_downloads"),
|
||||
field.Bool("remove_failed_downloads"),
|
||||
field.String("tags"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the DownloadClients.
|
||||
func (DownloadClients) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
28
ent/schema/epidodes.go
Normal file
28
ent/schema/epidodes.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Epidodes holds the schema definition for the Epidodes entity.
|
||||
type Epidodes struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Epidodes.
|
||||
func (Epidodes) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("series_id"),
|
||||
field.Int("season_number"),
|
||||
field.Int("episode_number"),
|
||||
field.String("title"),
|
||||
field.String("overview"),
|
||||
field.Time("air_date"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Epidodes.
|
||||
func (Epidodes) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
27
ent/schema/indexers.go
Normal file
27
ent/schema/indexers.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Indexers holds the schema definition for the Indexers entity.
|
||||
type Indexers struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Indexers.
|
||||
func (Indexers) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("name"),
|
||||
field.String("implementation"),
|
||||
field.String("settings"),
|
||||
field.Bool("enable_rss"),
|
||||
field.Int("priority"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Indexers.
|
||||
func (Indexers) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
28
ent/schema/series.go
Normal file
28
ent/schema/series.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Series holds the schema definition for the Series entity.
|
||||
type Series struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Series.
|
||||
func (Series) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("tmdb_id"),
|
||||
field.String("imdb_id"),
|
||||
field.String("title"),
|
||||
field.String("original_name"),
|
||||
field.String("overview"),
|
||||
field.String("path"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Series.
|
||||
func (Series) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
24
ent/schema/settings.go
Normal file
24
ent/schema/settings.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Settings holds the schema definition for the Settings entity.
|
||||
type Settings struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Settings.
|
||||
func (Settings) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("key"),
|
||||
field.String("value"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Settings.
|
||||
func (Settings) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user