mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 11:39:46 +08:00
implement download feature
This commit is contained in:
29
ent/schema/storage.go
Normal file
29
ent/schema/storage.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Storage holds the schema definition for the Storage entity.
|
||||
type Storage struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the Storage.
|
||||
func (Storage) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("name").Unique(),
|
||||
field.String("implementation"),
|
||||
field.String("path"),
|
||||
field.String("user").Optional(),
|
||||
field.String("password").Optional(),
|
||||
field.Bool("deleted").Default(false),
|
||||
field.Bool("default").Default(false),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the Storage.
|
||||
func (Storage) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user