Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Request) predicate.Request
- func CreateTime(v time.Time) predicate.Request
- func CreateTimeEQ(v time.Time) predicate.Request
- func CreateTimeGT(v time.Time) predicate.Request
- func CreateTimeGTE(v time.Time) predicate.Request
- func CreateTimeIn(vs ...time.Time) predicate.Request
- func CreateTimeLT(v time.Time) predicate.Request
- func CreateTimeLTE(v time.Time) predicate.Request
- func CreateTimeNEQ(v time.Time) predicate.Request
- func CreateTimeNotIn(vs ...time.Time) predicate.Request
- func HasApprovedBy() predicate.Request
- func HasApprovedByWith(preds ...predicate.User) predicate.Request
- func HasRequester() predicate.Request
- func HasRequesterWith(preds ...predicate.User) predicate.Request
- func ID(id uint32) predicate.Request
- func IDEQ(id uint32) predicate.Request
- func IDGT(id uint32) predicate.Request
- func IDGTE(id uint32) predicate.Request
- func IDIn(ids ...uint32) predicate.Request
- func IDLT(id uint32) predicate.Request
- func IDLTE(id uint32) predicate.Request
- func IDNEQ(id uint32) predicate.Request
- func IDNotIn(ids ...uint32) predicate.Request
- func MediaID(v uint32) predicate.Request
- func MediaIDEQ(v uint32) predicate.Request
- func MediaIDGT(v uint32) predicate.Request
- func MediaIDGTE(v uint32) predicate.Request
- func MediaIDIn(vs ...uint32) predicate.Request
- func MediaIDLT(v uint32) predicate.Request
- func MediaIDLTE(v uint32) predicate.Request
- func MediaIDNEQ(v uint32) predicate.Request
- func MediaIDNotIn(vs ...uint32) predicate.Request
- func MediaTypeEQ(v MediaType) predicate.Request
- func MediaTypeIn(vs ...MediaType) predicate.Request
- func MediaTypeNEQ(v MediaType) predicate.Request
- func MediaTypeNotIn(vs ...MediaType) predicate.Request
- func MediaTypeValidator(mt MediaType) error
- func Not(p predicate.Request) predicate.Request
- func Or(predicates ...predicate.Request) predicate.Request
- func Reason(v string) predicate.Request
- func ReasonContains(v string) predicate.Request
- func ReasonContainsFold(v string) predicate.Request
- func ReasonEQ(v string) predicate.Request
- func ReasonEqualFold(v string) predicate.Request
- func ReasonGT(v string) predicate.Request
- func ReasonGTE(v string) predicate.Request
- func ReasonHasPrefix(v string) predicate.Request
- func ReasonHasSuffix(v string) predicate.Request
- func ReasonIn(vs ...string) predicate.Request
- func ReasonIsNil() predicate.Request
- func ReasonLT(v string) predicate.Request
- func ReasonLTE(v string) predicate.Request
- func ReasonNEQ(v string) predicate.Request
- func ReasonNotIn(vs ...string) predicate.Request
- func ReasonNotNil() predicate.Request
- func StatusEQ(v Status) predicate.Request
- func StatusIn(vs ...Status) predicate.Request
- func StatusNEQ(v Status) predicate.Request
- func StatusNotIn(vs ...Status) predicate.Request
- func StatusValidator(s Status) error
- func Title(v string) predicate.Request
- func TitleContains(v string) predicate.Request
- func TitleContainsFold(v string) predicate.Request
- func TitleEQ(v string) predicate.Request
- func TitleEqualFold(v string) predicate.Request
- func TitleGT(v string) predicate.Request
- func TitleGTE(v string) predicate.Request
- func TitleHasPrefix(v string) predicate.Request
- func TitleHasSuffix(v string) predicate.Request
- func TitleIn(vs ...string) predicate.Request
- func TitleLT(v string) predicate.Request
- func TitleLTE(v string) predicate.Request
- func TitleNEQ(v string) predicate.Request
- func TitleNotIn(vs ...string) predicate.Request
- func UpdateTime(v time.Time) predicate.Request
- func UpdateTimeEQ(v time.Time) predicate.Request
- func UpdateTimeGT(v time.Time) predicate.Request
- func UpdateTimeGTE(v time.Time) predicate.Request
- func UpdateTimeIn(vs ...time.Time) predicate.Request
- func UpdateTimeLT(v time.Time) predicate.Request
- func UpdateTimeLTE(v time.Time) predicate.Request
- func UpdateTimeNEQ(v time.Time) predicate.Request
- func UpdateTimeNotIn(vs ...time.Time) predicate.Request
- func ValidColumn(column string) bool
- type MediaType
- type OrderOption
- func ByApprovedByField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMediaID(opts ...sql.OrderTermOption) OrderOption
- func ByMediaType(opts ...sql.OrderTermOption) OrderOption
- func ByReason(opts ...sql.OrderTermOption) OrderOption
- func ByRequesterField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
- type Status
Constants ¶
const ( // Label holds the string label denoting the request type in the database. Label = "request" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreateTime holds the string denoting the create_time field in the database. FieldCreateTime = "create_time" // FieldUpdateTime holds the string denoting the update_time field in the database. FieldUpdateTime = "update_time" // FieldMediaType holds the string denoting the media_type field in the database. FieldMediaType = "media_type" // FieldMediaID holds the string denoting the media_id field in the database. FieldMediaID = "media_id" // FieldTitle holds the string denoting the title field in the database. FieldTitle = "title" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldReason holds the string denoting the reason field in the database. FieldReason = "reason" // EdgeRequester holds the string denoting the requester edge name in mutations. EdgeRequester = "requester" // EdgeApprovedBy holds the string denoting the approved_by edge name in mutations. EdgeApprovedBy = "approved_by" // Table holds the table name of the request in the database. Table = "requests" // RequesterTable is the table that holds the requester relation/edge. RequesterTable = "requests" // RequesterInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. RequesterInverseTable = "users" // RequesterColumn is the table column denoting the requester relation/edge. RequesterColumn = "user_requests" // ApprovedByTable is the table that holds the approved_by relation/edge. ApprovedByTable = "requests" // ApprovedByInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. ApprovedByInverseTable = "users" // ApprovedByColumn is the table column denoting the approved_by relation/edge. ApprovedByColumn = "request_approved_by" )
const DefaultStatus = StatusPending
StatusPending is the default value of the Status enum.
Variables ¶
var ( // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time // DefaultUpdateTime holds the default value on creation for the "update_time" field. DefaultUpdateTime func() time.Time // UpdateDefaultUpdateTime holds the default value on update for the "update_time" field. UpdateDefaultUpdateTime func() time.Time // TitleValidator is a validator for the "title" field. It is called by the builders before save. TitleValidator func(string) error )
var Columns = []string{ FieldID, FieldCreateTime, FieldUpdateTime, FieldMediaType, FieldMediaID, FieldTitle, FieldStatus, FieldReason, }
Columns holds all SQL columns for request fields.
var ForeignKeys = []string{
"request_approved_by",
"user_requests",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "requests" table and are not defined as standalone fields in the schema.
Functions ¶
func CreateTime ¶
CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTimeEQ ¶
CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeGT ¶
CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGTE ¶
CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeIn ¶
CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeLT ¶
CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLTE ¶
CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeNEQ ¶
CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNotIn ¶
CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
func HasApprovedBy ¶
HasApprovedBy applies the HasEdge predicate on the "approved_by" edge.
func HasApprovedByWith ¶
HasApprovedByWith applies the HasEdge predicate on the "approved_by" edge with a given conditions (other predicates).
func HasRequester ¶
HasRequester applies the HasEdge predicate on the "requester" edge.
func HasRequesterWith ¶
HasRequesterWith applies the HasEdge predicate on the "requester" edge with a given conditions (other predicates).
func MediaID ¶
MediaID applies equality check predicate on the "media_id" field. It's identical to MediaIDEQ.
func MediaIDGTE ¶
MediaIDGTE applies the GTE predicate on the "media_id" field.
func MediaIDLTE ¶
MediaIDLTE applies the LTE predicate on the "media_id" field.
func MediaIDNEQ ¶
MediaIDNEQ applies the NEQ predicate on the "media_id" field.
func MediaIDNotIn ¶
MediaIDNotIn applies the NotIn predicate on the "media_id" field.
func MediaTypeEQ ¶
MediaTypeEQ applies the EQ predicate on the "media_type" field.
func MediaTypeIn ¶
MediaTypeIn applies the In predicate on the "media_type" field.
func MediaTypeNEQ ¶
MediaTypeNEQ applies the NEQ predicate on the "media_type" field.
func MediaTypeNotIn ¶
MediaTypeNotIn applies the NotIn predicate on the "media_type" field.
func MediaTypeValidator ¶
MediaTypeValidator is a validator for the "media_type" field enum values. It is called by the builders before save.
func Reason ¶
Reason applies equality check predicate on the "reason" field. It's identical to ReasonEQ.
func ReasonContains ¶
ReasonContains applies the Contains predicate on the "reason" field.
func ReasonContainsFold ¶
ReasonContainsFold applies the ContainsFold predicate on the "reason" field.
func ReasonEqualFold ¶
ReasonEqualFold applies the EqualFold predicate on the "reason" field.
func ReasonHasPrefix ¶
ReasonHasPrefix applies the HasPrefix predicate on the "reason" field.
func ReasonHasSuffix ¶
ReasonHasSuffix applies the HasSuffix predicate on the "reason" field.
func ReasonIsNil ¶
ReasonIsNil applies the IsNil predicate on the "reason" field.
func ReasonNotIn ¶
ReasonNotIn applies the NotIn predicate on the "reason" field.
func ReasonNotNil ¶
ReasonNotNil applies the NotNil predicate on the "reason" field.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func Title ¶
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEqualFold ¶
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleHasPrefix ¶
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" field.
func UpdateTime ¶
UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTimeEQ ¶
UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeGT ¶
UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGTE ¶
UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeIn ¶
UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeLT ¶
UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLTE ¶
UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeNEQ ¶
UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNotIn ¶
UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Request queries.
func ByApprovedByField ¶
func ByApprovedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByApprovedByField orders the results by approved_by field.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMediaID ¶
func ByMediaID(opts ...sql.OrderTermOption) OrderOption
ByMediaID orders the results by the media_id field.
func ByMediaType ¶
func ByMediaType(opts ...sql.OrderTermOption) OrderOption
ByMediaType orders the results by the media_type field.
func ByReason ¶
func ByReason(opts ...sql.OrderTermOption) OrderOption
ByReason orders the results by the reason field.
func ByRequesterField ¶
func ByRequesterField(field string, opts ...sql.OrderTermOption) OrderOption
ByRequesterField orders the results by requester field.
func ByStatus ¶
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time field.