package schema

import (
	"entgo.io/ent"
	"entgo.io/ent/dialect"
	"entgo.io/ent/dialect/entsql"
	"entgo.io/ent/schema"
	"entgo.io/ent/schema/field"
	
	
)

// DocServerGetProject holds the schema definition for the DocServerGetProject entity.
// Comments: 获取阿里转换文件项目
type DocServerGetProject struct {
	ent.Schema
}

// Fields of the DocServerGetProject.
func (DocServerGetProject) Fields() []ent.Field { 
    
	return []ent.Field{ 
		field.Int32("id").SchemaType(map[string]string{
			dialect.MySQL: "int",
		}).Unique().Comment(`id`),
		
		field.Int32("server_project_id").SchemaType(map[string]string{
			dialect.MySQL: "int",
		}).Default(0).Comment(`创建项目表id`),
		
		field.Int32("curr_num").SchemaType(map[string]string{
			dialect.MySQL: "int",
		}).Default(0).Comment(`获取项目的次数`),
		
		field.Int8("status").SchemaType(map[string]string{
			dialect.MySQL: "tinyint",
		}).Comment(`状态，0 待获取， 1 获取项目成功`),
		
		field.Text("ali_result").SchemaType(map[string]string{
            dialect.MySQL: "text",
        }).Optional().Nillable().MaxLen(65535).Comment(`阿里返回获取项目结果`),
		
		field.Time("created_at").SchemaType(map[string]string{
            dialect.MySQL: "datetime",
        }).Optional().Nillable(),
		
		field.Time("updated_at").SchemaType(map[string]string{
            dialect.MySQL: "datetime",
        }).Optional().Nillable(),
		
	}
}

func (DocServerGetProject) Annotations() []schema.Annotation {
	return []schema.Annotation{
		entsql.Annotation{Table: `doc_server_get_project`},
	}
}

func (DocServerGetProject) Hooks() []ent.Hook {
    return []ent.Hook{ 
    }
}
