mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 06:28:18 +01:00
20 lines
290 B
Go
20 lines
290 B
Go
package schema
|
|
|
|
import (
|
|
"entgo.io/ent"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
type Image struct{ ent.Schema }
|
|
|
|
func (Image) Fields() []ent.Field {
|
|
return []ent.Field{
|
|
field.String("url").Validate(ValidateURI),
|
|
field.String("mimeType"),
|
|
}
|
|
}
|
|
|
|
func (Image) Edges() []ent.Edge {
|
|
return nil
|
|
}
|