github.com/oinume/lekcije@v0.0.0-20231017100347-5b4c5eb6ab24/backend/model2/boil_types.go (about)

     1  // Code generated by SQLBoiler 4.14.2 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
     2  // This file is meant to be re-generated in place and/or deleted at any time.
     3  
     4  package model2
     5  
     6  import (
     7  	"strconv"
     8  
     9  	"github.com/friendsofgo/errors"
    10  	"github.com/volatiletech/sqlboiler/v4/boil"
    11  	"github.com/volatiletech/strmangle"
    12  )
    13  
    14  // M type is for providing columns and column values to UpdateAll.
    15  type M map[string]interface{}
    16  
    17  // ErrSyncFail occurs during insert when the record could not be retrieved in
    18  // order to populate default value information. This usually happens when LastInsertId
    19  // fails or there was a primary key configuration that was not resolvable.
    20  var ErrSyncFail = errors.New("model2: failed to synchronize data after insert")
    21  
    22  type insertCache struct {
    23  	query        string
    24  	retQuery     string
    25  	valueMapping []uint64
    26  	retMapping   []uint64
    27  }
    28  
    29  type updateCache struct {
    30  	query        string
    31  	valueMapping []uint64
    32  }
    33  
    34  func makeCacheKey(cols boil.Columns, nzDefaults []string) string {
    35  	buf := strmangle.GetBuffer()
    36  
    37  	buf.WriteString(strconv.Itoa(cols.Kind))
    38  	for _, w := range cols.Cols {
    39  		buf.WriteString(w)
    40  	}
    41  
    42  	if len(nzDefaults) != 0 {
    43  		buf.WriteByte('.')
    44  	}
    45  	for _, nz := range nzDefaults {
    46  		buf.WriteString(nz)
    47  	}
    48  
    49  	str := buf.String()
    50  	strmangle.PutBuffer(buf)
    51  	return str
    52  }
    53  
    54  // Enum values for EventLogEmailEvent
    55  const (
    56  	EventLogEmailEventClick     string = "click"
    57  	EventLogEmailEventDelivered string = "delivered"
    58  	EventLogEmailEventOpen      string = "open"
    59  	EventLogEmailEventDeferred  string = "deferred"
    60  	EventLogEmailEventDropped   string = "dropped"
    61  	EventLogEmailEventBounce    string = "bounce"
    62  	EventLogEmailEventBlock     string = "block"
    63  )
    64  
    65  func AllEventLogEmailEvent() []string {
    66  	return []string{
    67  		EventLogEmailEventClick,
    68  		EventLogEmailEventDelivered,
    69  		EventLogEmailEventOpen,
    70  		EventLogEmailEventDeferred,
    71  		EventLogEmailEventDropped,
    72  		EventLogEmailEventBounce,
    73  		EventLogEmailEventBlock,
    74  	}
    75  }
    76  
    77  // Enum values for EventLogEmailEmailType
    78  const (
    79  	EventLogEmailEmailTypeNewLessonNotifier string = "new_lesson_notifier"
    80  	EventLogEmailEmailTypeFollowReminder    string = "follow_reminder"
    81  	EventLogEmailEmailTypeRegistration      string = "registration"
    82  )
    83  
    84  func AllEventLogEmailEmailType() []string {
    85  	return []string{
    86  		EventLogEmailEmailTypeNewLessonNotifier,
    87  		EventLogEmailEmailTypeFollowReminder,
    88  		EventLogEmailEmailTypeRegistration,
    89  	}
    90  }
    91  
    92  // Enum values for LessonStatus
    93  const (
    94  	LessonStatusFinished  string = "finished"
    95  	LessonStatusReserved  string = "reserved"
    96  	LessonStatusAvailable string = "available"
    97  	LessonStatusCancelled string = "cancelled"
    98  )
    99  
   100  func AllLessonStatus() []string {
   101  	return []string{
   102  		LessonStatusFinished,
   103  		LessonStatusReserved,
   104  		LessonStatusAvailable,
   105  		LessonStatusCancelled,
   106  	}
   107  }
   108  
   109  // Enum values for LessonStatusLogStatus
   110  const (
   111  	LessonStatusLogStatusFinished  string = "finished"
   112  	LessonStatusLogStatusReserved  string = "reserved"
   113  	LessonStatusLogStatusAvailable string = "available"
   114  	LessonStatusLogStatusCancelled string = "cancelled"
   115  )
   116  
   117  func AllLessonStatusLogStatus() []string {
   118  	return []string{
   119  		LessonStatusLogStatusFinished,
   120  		LessonStatusLogStatusReserved,
   121  		LessonStatusLogStatusAvailable,
   122  		LessonStatusLogStatusCancelled,
   123  	}
   124  }
   125  
   126  // Enum values for StatDailyNotificationEventEvent
   127  const (
   128  	StatDailyNotificationEventEventClick     string = "click"
   129  	StatDailyNotificationEventEventDelivered string = "delivered"
   130  	StatDailyNotificationEventEventOpen      string = "open"
   131  	StatDailyNotificationEventEventDeferred  string = "deferred"
   132  	StatDailyNotificationEventEventDropped   string = "dropped"
   133  	StatDailyNotificationEventEventBounce    string = "bounce"
   134  	StatDailyNotificationEventEventBlock     string = "block"
   135  )
   136  
   137  func AllStatDailyNotificationEventEvent() []string {
   138  	return []string{
   139  		StatDailyNotificationEventEventClick,
   140  		StatDailyNotificationEventEventDelivered,
   141  		StatDailyNotificationEventEventOpen,
   142  		StatDailyNotificationEventEventDeferred,
   143  		StatDailyNotificationEventEventDropped,
   144  		StatDailyNotificationEventEventBounce,
   145  		StatDailyNotificationEventEventBlock,
   146  	}
   147  }
   148  
   149  // Enum values for StatDailyUserNotificationEventEvent
   150  const (
   151  	StatDailyUserNotificationEventEventOpen string = "open"
   152  )
   153  
   154  func AllStatDailyUserNotificationEventEvent() []string {
   155  	return []string{
   156  		StatDailyUserNotificationEventEventOpen,
   157  	}
   158  }
   159  
   160  // Enum values for StatNewLessonNotifierEvent
   161  const (
   162  	StatNewLessonNotifierEventClick     string = "click"
   163  	StatNewLessonNotifierEventDelivered string = "delivered"
   164  	StatNewLessonNotifierEventOpen      string = "open"
   165  	StatNewLessonNotifierEventDeferred  string = "deferred"
   166  	StatNewLessonNotifierEventDropped   string = "dropped"
   167  	StatNewLessonNotifierEventBounce    string = "bounce"
   168  	StatNewLessonNotifierEventBlock     string = "block"
   169  )
   170  
   171  func AllStatNewLessonNotifierEvent() []string {
   172  	return []string{
   173  		StatNewLessonNotifierEventClick,
   174  		StatNewLessonNotifierEventDelivered,
   175  		StatNewLessonNotifierEventOpen,
   176  		StatNewLessonNotifierEventDeferred,
   177  		StatNewLessonNotifierEventDropped,
   178  		StatNewLessonNotifierEventBounce,
   179  		StatNewLessonNotifierEventBlock,
   180  	}
   181  }
   182  
   183  // Enum values for TeacherGender
   184  const (
   185  	TeacherGenderFemale string = "female"
   186  	TeacherGenderMale   string = "male"
   187  	TeacherGenderOther  string = "other"
   188  )
   189  
   190  func AllTeacherGender() []string {
   191  	return []string{
   192  		TeacherGenderFemale,
   193  		TeacherGenderMale,
   194  		TeacherGenderOther,
   195  	}
   196  }