init: create project
This commit is contained in:
37
server/ent/schema/jdmodel.go
Normal file
37
server/ent/schema/jdmodel.go
Normal file
@ -0,0 +1,37 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"github.com/facebook/ent"
|
||||
"github.com/facebook/ent/dialect/entsql"
|
||||
"github.com/facebook/ent/schema"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
)
|
||||
|
||||
// JDModel holds the schema definition for the JDModel entity.
|
||||
type JDModel struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Annotations of the JDModel.
|
||||
func (JDModel) Annotations() []schema.Annotation {
|
||||
return []schema.Annotation{
|
||||
entsql.Annotation{Table: "jd"},
|
||||
}
|
||||
}
|
||||
|
||||
// Fields of the JDModel.
|
||||
func (JDModel) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("name"),
|
||||
field.String("nickname"),
|
||||
field.String("password"),
|
||||
field.String("email"),
|
||||
field.String("id_number"),
|
||||
field.Int64("phone_number"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the JDModel.
|
||||
func (JDModel) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
33
server/ent/schema/qqmodel.go
Normal file
33
server/ent/schema/qqmodel.go
Normal file
@ -0,0 +1,33 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"github.com/facebook/ent"
|
||||
"github.com/facebook/ent/dialect/entsql"
|
||||
"github.com/facebook/ent/schema"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
)
|
||||
|
||||
// QQModel holds the schema definition for the QQModel entity.
|
||||
type QQModel struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Annotations of the QQModel.
|
||||
func (QQModel) Annotations() []schema.Annotation {
|
||||
return []schema.Annotation{
|
||||
entsql.Annotation{Table: "qq"},
|
||||
}
|
||||
}
|
||||
|
||||
// Fields of the QQModel.
|
||||
func (QQModel) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int64("qq_number"),
|
||||
field.Int64("phone_number"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the QQModel.
|
||||
func (QQModel) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
34
server/ent/schema/sfmodel.go
Normal file
34
server/ent/schema/sfmodel.go
Normal file
@ -0,0 +1,34 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"github.com/facebook/ent"
|
||||
"github.com/facebook/ent/dialect/entsql"
|
||||
"github.com/facebook/ent/schema"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
)
|
||||
|
||||
// SFModel holds the schema definition for the SFModel entity.
|
||||
type SFModel struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
// Annotations of the SFModel.
|
||||
func (SFModel) Annotations() []schema.Annotation {
|
||||
return []schema.Annotation{
|
||||
entsql.Annotation{Table: "sf"},
|
||||
}
|
||||
}
|
||||
|
||||
// Fields of the SFModel.
|
||||
func (SFModel) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("name"),
|
||||
field.Int64("phone_number"),
|
||||
field.String("address"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the SFModel.
|
||||
func (SFModel) Edges() []ent.Edge {
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user