mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/72 Reviewed By: alexsn Differential Revision: D17783580 fbshipit-source-id: 597f124a28415fef66b0b16811ad2acac8df631d
32 lines
847 B
Go
32 lines
847 B
Go
// Copyright 2019-present Facebook Inc. All rights reserved.
|
|
// This source code is licensed under the Apache 2.0 license found
|
|
// in the LICENSE file in the root directory of this source tree.
|
|
|
|
// +build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/facebookincubator/ent/entc"
|
|
"github.com/facebookincubator/ent/entc/gen"
|
|
"github.com/facebookincubator/ent/schema/field"
|
|
)
|
|
|
|
func main() {
|
|
err := entc.Generate("./schema", &gen.Config{
|
|
Header: `
|
|
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
// This source code is licensed under the Apache 2.0 license found
|
|
// in the LICENSE file in the root directory of this source tree.
|
|
|
|
// Code generated (@generated) by entc, DO NOT EDIT.
|
|
`,
|
|
IDType: &field.TypeInfo{Type: field.TypeInt},
|
|
})
|
|
if err != nil {
|
|
log.Fatal("running ent codegen:", err)
|
|
}
|
|
}
|