| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // Code generated by ent, DO NOT EDIT.
- package batchimageevent
- import (
- "time"
- "entgo.io/ent/dialect/sql"
- )
- const (
- // Label holds the string label denoting the batchimageevent type in the database.
- Label = "batch_image_event"
- // FieldID holds the string denoting the id field in the database.
- FieldID = "id"
- // FieldJobID holds the string denoting the job_id field in the database.
- FieldJobID = "job_id"
- // FieldEventType holds the string denoting the event_type field in the database.
- FieldEventType = "event_type"
- // FieldPayload holds the string denoting the payload field in the database.
- FieldPayload = "payload"
- // FieldEventHash holds the string denoting the event_hash field in the database.
- FieldEventHash = "event_hash"
- // FieldCreatedAt holds the string denoting the created_at field in the database.
- FieldCreatedAt = "created_at"
- // Table holds the table name of the batchimageevent in the database.
- Table = "batch_image_events"
- )
- // Columns holds all SQL columns for batchimageevent fields.
- var Columns = []string{
- FieldID,
- FieldJobID,
- FieldEventType,
- FieldPayload,
- FieldEventHash,
- FieldCreatedAt,
- }
- // 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
- }
- }
- return false
- }
- var (
- // JobIDValidator is a validator for the "job_id" field. It is called by the builders before save.
- JobIDValidator func(string) error
- // EventTypeValidator is a validator for the "event_type" field. It is called by the builders before save.
- EventTypeValidator func(string) error
- // EventHashValidator is a validator for the "event_hash" field. It is called by the builders before save.
- EventHashValidator func(string) error
- // DefaultCreatedAt holds the default value on creation for the "created_at" field.
- DefaultCreatedAt func() time.Time
- )
- // OrderOption defines the ordering options for the BatchImageEvent 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()
- }
- // ByJobID orders the results by the job_id field.
- func ByJobID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldJobID, opts...).ToFunc()
- }
- // ByEventType orders the results by the event_type field.
- func ByEventType(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldEventType, opts...).ToFunc()
- }
- // ByEventHash orders the results by the event_hash field.
- func ByEventHash(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldEventHash, opts...).ToFunc()
- }
- // ByCreatedAt orders the results by the created_at field.
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
- }
|