generated from datumforge/go-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
organizationsetting.go
212 lines (189 loc) · 8.26 KB
/
organizationsetting.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
// Code generated by ent, DO NOT EDIT.
package organizationsetting
import (
"time"
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
// Label holds the string label denoting the organizationsetting type in the database.
Label = "organization_setting"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// FieldCreatedBy holds the string denoting the created_by field in the database.
FieldCreatedBy = "created_by"
// FieldUpdatedBy holds the string denoting the updated_by field in the database.
FieldUpdatedBy = "updated_by"
// FieldDomains holds the string denoting the domains field in the database.
FieldDomains = "domains"
// FieldSSOCert holds the string denoting the sso_cert field in the database.
FieldSSOCert = "sso_cert"
// FieldSSOEntrypoint holds the string denoting the sso_entrypoint field in the database.
FieldSSOEntrypoint = "sso_entrypoint"
// FieldSSOIssuer holds the string denoting the sso_issuer field in the database.
FieldSSOIssuer = "sso_issuer"
// FieldBillingContact holds the string denoting the billing_contact field in the database.
FieldBillingContact = "billing_contact"
// FieldBillingEmail holds the string denoting the billing_email field in the database.
FieldBillingEmail = "billing_email"
// FieldBillingPhone holds the string denoting the billing_phone field in the database.
FieldBillingPhone = "billing_phone"
// FieldBillingAddress holds the string denoting the billing_address field in the database.
FieldBillingAddress = "billing_address"
// FieldTaxIdentifier holds the string denoting the tax_identifier field in the database.
FieldTaxIdentifier = "tax_identifier"
// FieldTags holds the string denoting the tags field in the database.
FieldTags = "tags"
// EdgeOrganization holds the string denoting the organization edge name in mutations.
EdgeOrganization = "organization"
// Table holds the table name of the organizationsetting in the database.
Table = "organization_settings"
// OrganizationTable is the table that holds the organization relation/edge.
OrganizationTable = "organization_settings"
// OrganizationInverseTable is the table name for the Organization entity.
// It exists in this package in order to avoid circular dependency with the "organization" package.
OrganizationInverseTable = "organizations"
// OrganizationColumn is the table column denoting the organization relation/edge.
OrganizationColumn = "organization_setting"
)
// Columns holds all SQL columns for organizationsetting fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldCreatedBy,
FieldUpdatedBy,
FieldDomains,
FieldSSOCert,
FieldSSOEntrypoint,
FieldSSOIssuer,
FieldBillingContact,
FieldBillingEmail,
FieldBillingPhone,
FieldBillingAddress,
FieldTaxIdentifier,
FieldTags,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "organization_settings"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"organization_setting",
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
for i := range ForeignKeys {
if column == ForeignKeys[i] {
return true
}
}
return false
}
// Note that the variables below are initialized by the runtime
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
// import _ "github.com/datumforge/datum/internal/ent/generated/runtime"
var (
Hooks [1]ent.Hook
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() time.Time
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
DefaultUpdatedAt func() time.Time
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
UpdateDefaultUpdatedAt func() time.Time
// DefaultSSOCert holds the default value on creation for the "sso_cert" field.
DefaultSSOCert string
// DefaultSSOEntrypoint holds the default value on creation for the "sso_entrypoint" field.
DefaultSSOEntrypoint string
// DefaultSSOIssuer holds the default value on creation for the "sso_issuer" field.
DefaultSSOIssuer string
// BillingContactValidator is a validator for the "billing_contact" field. It is called by the builders before save.
BillingContactValidator func(string) error
// BillingEmailValidator is a validator for the "billing_email" field. It is called by the builders before save.
BillingEmailValidator func(string) error
// BillingPhoneValidator is a validator for the "billing_phone" field. It is called by the builders before save.
BillingPhoneValidator func(string) error
// BillingAddressValidator is a validator for the "billing_address" field. It is called by the builders before save.
BillingAddressValidator func(string) error
// DefaultTags holds the default value on creation for the "tags" field.
DefaultTags []string
// DefaultID holds the default value on creation for the "id" field.
DefaultID func() string
)
// OrderOption defines the ordering options for the OrganizationSetting queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}
// ByCreatedBy orders the results by the created_by field.
func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedBy, opts...).ToFunc()
}
// ByUpdatedBy orders the results by the updated_by field.
func ByUpdatedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedBy, opts...).ToFunc()
}
// BySSOCert orders the results by the sso_cert field.
func BySSOCert(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSSOCert, opts...).ToFunc()
}
// BySSOEntrypoint orders the results by the sso_entrypoint field.
func BySSOEntrypoint(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSSOEntrypoint, opts...).ToFunc()
}
// BySSOIssuer orders the results by the sso_issuer field.
func BySSOIssuer(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSSOIssuer, opts...).ToFunc()
}
// ByBillingContact orders the results by the billing_contact field.
func ByBillingContact(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBillingContact, opts...).ToFunc()
}
// ByBillingEmail orders the results by the billing_email field.
func ByBillingEmail(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBillingEmail, opts...).ToFunc()
}
// ByBillingPhone orders the results by the billing_phone field.
func ByBillingPhone(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBillingPhone, opts...).ToFunc()
}
// ByBillingAddress orders the results by the billing_address field.
func ByBillingAddress(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBillingAddress, opts...).ToFunc()
}
// ByTaxIdentifier orders the results by the tax_identifier field.
func ByTaxIdentifier(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTaxIdentifier, opts...).ToFunc()
}
// ByOrganizationField orders the results by organization field.
func ByOrganizationField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newOrganizationStep(), sql.OrderByField(field, opts...))
}
}
func newOrganizationStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(OrganizationInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2O, true, OrganizationTable, OrganizationColumn),
)
}