file

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the file type in the database.
	Label = "file"
	// 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"
	// FieldCaption holds the string denoting the caption field in the database.
	FieldCaption = "caption"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldMimeType holds the string denoting the mime_type field in the database.
	FieldMimeType = "mime_type"
	// FieldStorageFileName holds the string denoting the storage_file_name field in the database.
	FieldStorageFileName = "storage_file_name"
	// FieldSize holds the string denoting the size field in the database.
	FieldSize = "size"
	// EdgeAdminCreatedBy holds the string denoting the admin_created_by edge name in mutations.
	EdgeAdminCreatedBy = "admin_created_by"
	// EdgeAdminUpdatedBy holds the string denoting the admin_updated_by edge name in mutations.
	EdgeAdminUpdatedBy = "admin_updated_by"
	// EdgeCreatedBy holds the string denoting the created_by edge name in mutations.
	EdgeCreatedBy = "created_by"
	// EdgeUpdatedBy holds the string denoting the updated_by edge name in mutations.
	EdgeUpdatedBy = "updated_by"
	// Table holds the table name of the file in the database.
	Table = "files"
	// AdminCreatedByTable is the table that holds the admin_created_by relation/edge.
	AdminCreatedByTable = "files"
	// AdminCreatedByInverseTable is the table name for the AdminUser entity.
	// It exists in this package in order to avoid circular dependency with the "adminuser" package.
	AdminCreatedByInverseTable = "admin_users"
	// AdminCreatedByColumn is the table column denoting the admin_created_by relation/edge.
	AdminCreatedByColumn = "file_admin_created_by"
	// AdminUpdatedByTable is the table that holds the admin_updated_by relation/edge.
	AdminUpdatedByTable = "files"
	// AdminUpdatedByInverseTable is the table name for the AdminUser entity.
	// It exists in this package in order to avoid circular dependency with the "adminuser" package.
	AdminUpdatedByInverseTable = "admin_users"
	// AdminUpdatedByColumn is the table column denoting the admin_updated_by relation/edge.
	AdminUpdatedByColumn = "file_admin_updated_by"
	// CreatedByTable is the table that holds the created_by relation/edge.
	CreatedByTable = "files"
	// CreatedByInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	CreatedByInverseTable = "users"
	// CreatedByColumn is the table column denoting the created_by relation/edge.
	CreatedByColumn = "file_created_by"
	// UpdatedByTable is the table that holds the updated_by relation/edge.
	UpdatedByTable = "files"
	// UpdatedByInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UpdatedByInverseTable = "users"
	// UpdatedByColumn is the table column denoting the updated_by relation/edge.
	UpdatedByColumn = "file_updated_by"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() string
)

Columns holds all SQL columns for file fields.

View Source
var ForeignKeys = []string{
	"file_admin_created_by",
	"file_admin_updated_by",
	"file_created_by",
	"file_updated_by",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "files" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.File) predicate.File

And groups predicates with the AND operator between them.

func Caption

func Caption(v string) predicate.File

Caption applies equality check predicate on the "caption" field. It's identical to CaptionEQ.

func CaptionContains

func CaptionContains(v string) predicate.File

CaptionContains applies the Contains predicate on the "caption" field.

func CaptionContainsFold

func CaptionContainsFold(v string) predicate.File

CaptionContainsFold applies the ContainsFold predicate on the "caption" field.

func CaptionEQ

func CaptionEQ(v string) predicate.File

CaptionEQ applies the EQ predicate on the "caption" field.

func CaptionEqualFold

func CaptionEqualFold(v string) predicate.File

CaptionEqualFold applies the EqualFold predicate on the "caption" field.

func CaptionGT

func CaptionGT(v string) predicate.File

CaptionGT applies the GT predicate on the "caption" field.

func CaptionGTE

func CaptionGTE(v string) predicate.File

CaptionGTE applies the GTE predicate on the "caption" field.

func CaptionHasPrefix

func CaptionHasPrefix(v string) predicate.File

CaptionHasPrefix applies the HasPrefix predicate on the "caption" field.

func CaptionHasSuffix

func CaptionHasSuffix(v string) predicate.File

CaptionHasSuffix applies the HasSuffix predicate on the "caption" field.

func CaptionIn

func CaptionIn(vs ...string) predicate.File

CaptionIn applies the In predicate on the "caption" field.

func CaptionIsNil

func CaptionIsNil() predicate.File

CaptionIsNil applies the IsNil predicate on the "caption" field.

func CaptionLT

func CaptionLT(v string) predicate.File

CaptionLT applies the LT predicate on the "caption" field.

func CaptionLTE

func CaptionLTE(v string) predicate.File

CaptionLTE applies the LTE predicate on the "caption" field.

func CaptionNEQ

func CaptionNEQ(v string) predicate.File

CaptionNEQ applies the NEQ predicate on the "caption" field.

func CaptionNotIn

func CaptionNotIn(vs ...string) predicate.File

CaptionNotIn applies the NotIn predicate on the "caption" field.

func CaptionNotNil

func CaptionNotNil() predicate.File

CaptionNotNil applies the NotNil predicate on the "caption" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.File

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.File

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.File

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.File

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.File

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtIsNil

func CreatedAtIsNil() predicate.File

CreatedAtIsNil applies the IsNil predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.File

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.File

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.File

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.File

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func CreatedAtNotNil

func CreatedAtNotNil() predicate.File

CreatedAtNotNil applies the NotNil predicate on the "created_at" field.

func HasAdminCreatedBy

func HasAdminCreatedBy() predicate.File

HasAdminCreatedBy applies the HasEdge predicate on the "admin_created_by" edge.

func HasAdminCreatedByWith

func HasAdminCreatedByWith(preds ...predicate.AdminUser) predicate.File

HasAdminCreatedByWith applies the HasEdge predicate on the "admin_created_by" edge with a given conditions (other predicates).

func HasAdminUpdatedBy

func HasAdminUpdatedBy() predicate.File

HasAdminUpdatedBy applies the HasEdge predicate on the "admin_updated_by" edge.

func HasAdminUpdatedByWith

func HasAdminUpdatedByWith(preds ...predicate.AdminUser) predicate.File

HasAdminUpdatedByWith applies the HasEdge predicate on the "admin_updated_by" edge with a given conditions (other predicates).

func HasCreatedBy

func HasCreatedBy() predicate.File

HasCreatedBy applies the HasEdge predicate on the "created_by" edge.

func HasCreatedByWith

func HasCreatedByWith(preds ...predicate.User) predicate.File

HasCreatedByWith applies the HasEdge predicate on the "created_by" edge with a given conditions (other predicates).

func HasUpdatedBy

func HasUpdatedBy() predicate.File

HasUpdatedBy applies the HasEdge predicate on the "updated_by" edge.

func HasUpdatedByWith

func HasUpdatedByWith(preds ...predicate.User) predicate.File

HasUpdatedByWith applies the HasEdge predicate on the "updated_by" edge with a given conditions (other predicates).

func ID

func ID(id string) predicate.File

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.File

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.File

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.File

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.File

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.File

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.File

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.File

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.File

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.File

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.File

IDNotIn applies the NotIn predicate on the ID field.

func MimeType

func MimeType(v string) predicate.File

MimeType applies equality check predicate on the "mime_type" field. It's identical to MimeTypeEQ.

func MimeTypeContains

func MimeTypeContains(v string) predicate.File

MimeTypeContains applies the Contains predicate on the "mime_type" field.

func MimeTypeContainsFold

func MimeTypeContainsFold(v string) predicate.File

MimeTypeContainsFold applies the ContainsFold predicate on the "mime_type" field.

func MimeTypeEQ

func MimeTypeEQ(v string) predicate.File

MimeTypeEQ applies the EQ predicate on the "mime_type" field.

func MimeTypeEqualFold

func MimeTypeEqualFold(v string) predicate.File

MimeTypeEqualFold applies the EqualFold predicate on the "mime_type" field.

func MimeTypeGT

func MimeTypeGT(v string) predicate.File

MimeTypeGT applies the GT predicate on the "mime_type" field.

func MimeTypeGTE

func MimeTypeGTE(v string) predicate.File

MimeTypeGTE applies the GTE predicate on the "mime_type" field.

func MimeTypeHasPrefix

func MimeTypeHasPrefix(v string) predicate.File

MimeTypeHasPrefix applies the HasPrefix predicate on the "mime_type" field.

func MimeTypeHasSuffix

func MimeTypeHasSuffix(v string) predicate.File

MimeTypeHasSuffix applies the HasSuffix predicate on the "mime_type" field.

func MimeTypeIn

func MimeTypeIn(vs ...string) predicate.File

MimeTypeIn applies the In predicate on the "mime_type" field.

func MimeTypeLT

func MimeTypeLT(v string) predicate.File

MimeTypeLT applies the LT predicate on the "mime_type" field.

func MimeTypeLTE

func MimeTypeLTE(v string) predicate.File

MimeTypeLTE applies the LTE predicate on the "mime_type" field.

func MimeTypeNEQ

func MimeTypeNEQ(v string) predicate.File

MimeTypeNEQ applies the NEQ predicate on the "mime_type" field.

func MimeTypeNotIn

func MimeTypeNotIn(vs ...string) predicate.File

MimeTypeNotIn applies the NotIn predicate on the "mime_type" field.

func Name

func Name(v string) predicate.File

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.File

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.File

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.File

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.File

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.File

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.File

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.File

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.File

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.File

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.File

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.File

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.File

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.File

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.File) predicate.File

Or groups predicates with the OR operator between them.

func Size

func Size(v int64) predicate.File

Size applies equality check predicate on the "size" field. It's identical to SizeEQ.

func SizeEQ

func SizeEQ(v int64) predicate.File

SizeEQ applies the EQ predicate on the "size" field.

func SizeGT

func SizeGT(v int64) predicate.File

SizeGT applies the GT predicate on the "size" field.

func SizeGTE

func SizeGTE(v int64) predicate.File

SizeGTE applies the GTE predicate on the "size" field.

func SizeIn

func SizeIn(vs ...int64) predicate.File

SizeIn applies the In predicate on the "size" field.

func SizeLT

func SizeLT(v int64) predicate.File

SizeLT applies the LT predicate on the "size" field.

func SizeLTE

func SizeLTE(v int64) predicate.File

SizeLTE applies the LTE predicate on the "size" field.

func SizeNEQ

func SizeNEQ(v int64) predicate.File

SizeNEQ applies the NEQ predicate on the "size" field.

func SizeNotIn

func SizeNotIn(vs ...int64) predicate.File

SizeNotIn applies the NotIn predicate on the "size" field.

func StorageFileName

func StorageFileName(v string) predicate.File

StorageFileName applies equality check predicate on the "storage_file_name" field. It's identical to StorageFileNameEQ.

func StorageFileNameContains

func StorageFileNameContains(v string) predicate.File

StorageFileNameContains applies the Contains predicate on the "storage_file_name" field.

func StorageFileNameContainsFold

func StorageFileNameContainsFold(v string) predicate.File

StorageFileNameContainsFold applies the ContainsFold predicate on the "storage_file_name" field.

func StorageFileNameEQ

func StorageFileNameEQ(v string) predicate.File

StorageFileNameEQ applies the EQ predicate on the "storage_file_name" field.

func StorageFileNameEqualFold

func StorageFileNameEqualFold(v string) predicate.File

StorageFileNameEqualFold applies the EqualFold predicate on the "storage_file_name" field.

func StorageFileNameGT

func StorageFileNameGT(v string) predicate.File

StorageFileNameGT applies the GT predicate on the "storage_file_name" field.

func StorageFileNameGTE

func StorageFileNameGTE(v string) predicate.File

StorageFileNameGTE applies the GTE predicate on the "storage_file_name" field.

func StorageFileNameHasPrefix

func StorageFileNameHasPrefix(v string) predicate.File

StorageFileNameHasPrefix applies the HasPrefix predicate on the "storage_file_name" field.

func StorageFileNameHasSuffix

func StorageFileNameHasSuffix(v string) predicate.File

StorageFileNameHasSuffix applies the HasSuffix predicate on the "storage_file_name" field.

func StorageFileNameIn

func StorageFileNameIn(vs ...string) predicate.File

StorageFileNameIn applies the In predicate on the "storage_file_name" field.

func StorageFileNameLT

func StorageFileNameLT(v string) predicate.File

StorageFileNameLT applies the LT predicate on the "storage_file_name" field.

func StorageFileNameLTE

func StorageFileNameLTE(v string) predicate.File

StorageFileNameLTE applies the LTE predicate on the "storage_file_name" field.

func StorageFileNameNEQ

func StorageFileNameNEQ(v string) predicate.File

StorageFileNameNEQ applies the NEQ predicate on the "storage_file_name" field.

func StorageFileNameNotIn

func StorageFileNameNotIn(vs ...string) predicate.File

StorageFileNameNotIn applies the NotIn predicate on the "storage_file_name" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.File

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.File

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.File

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.File

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.File

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtIsNil

func UpdatedAtIsNil() predicate.File

UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.File

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.File

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.File

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.File

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedAtNotNil

func UpdatedAtNotNil() predicate.File

UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the File queries.

func ByAdminCreatedByField

func ByAdminCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption

ByAdminCreatedByField orders the results by admin_created_by field.

func ByAdminUpdatedByField

func ByAdminUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption

ByAdminUpdatedByField orders the results by admin_updated_by field.

func ByCaption

func ByCaption(opts ...sql.OrderTermOption) OrderOption

ByCaption orders the results by the caption field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByCreatedByField

func ByCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption

ByCreatedByField orders the results by created_by field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByMimeType

func ByMimeType(opts ...sql.OrderTermOption) OrderOption

ByMimeType orders the results by the mime_type field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func BySize

func BySize(opts ...sql.OrderTermOption) OrderOption

BySize orders the results by the size field.

func ByStorageFileName

func ByStorageFileName(opts ...sql.OrderTermOption) OrderOption

ByStorageFileName orders the results by the storage_file_name field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedByField

func ByUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption

ByUpdatedByField orders the results by updated_by field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL