mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
18 lines
364 B
Cheetah
18 lines
364 B
Cheetah
{{ define "main" }}
|
|
package main
|
|
|
|
import (
|
|
{{ printf "%q" .Package }}
|
|
|
|
"fbc/ent"
|
|
)
|
|
|
|
{{ $base := base .Package}}
|
|
|
|
// {{ .Symbol }} is the plugin for exporting the {{ printf "%q" $base }} schemas for entc.
|
|
var {{ .Symbol }} = []ent.Schema{
|
|
{{ range $_, $name := .Names }}
|
|
{{- $base }}.{{- printf "%s{Schema: ent.DefaultSchema}" $name }},
|
|
{{ end -}}
|
|
}
|
|
{{ end }} |