[feature] migrate to monorepo
This commit is contained in:
commit
05ddc1f783
267 changed files with 75165 additions and 0 deletions
32
backend/ent/schema/dailycategory.go
Normal file
32
backend/ent/schema/dailycategory.go
Normal file
|
@ -0,0 +1,32 @@
|
|||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
"entgo.io/ent/schema/edge"
|
||||
"time"
|
||||
)
|
||||
|
||||
// DailyCategory holds the schema definition for the DailyCategory entity.
|
||||
type DailyCategory struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Fields of the DailyCategory.
|
||||
func (DailyCategory) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Time("created_at").
|
||||
Default(time.Now),
|
||||
field.Time("updated_at").
|
||||
Default(time.Now).
|
||||
UpdateDefault(time.Now),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the DailyCategory.
|
||||
func (DailyCategory) Edges() []ent.Edge {
|
||||
return []ent.Edge{
|
||||
edge.To("contents", DailyCategoryContent.Type),
|
||||
edge.To("daily_items", Daily.Type),
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue