// Code generated by relspecgo. DO NOT EDIT. package generatedmodels import ( "fmt" resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" "github.com/uptrace/bun" ) type ModelPublicImportantDates struct { bun.BaseModel `bun:"table:public.important_dates,alias:important_dates"` ID resolvespec_common.SqlUUID `bun:"id,type:uuid,pk,default:gen_random_uuid()," json:"id"` CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"` DateValue resolvespec_common.SqlDate `bun:"date_value,type:date,notnull," json:"date_value"` FamilyMemberID resolvespec_common.SqlUUID `bun:"family_member_id,type:uuid,nullzero," json:"family_member_id"` Notes resolvespec_common.SqlString `bun:"notes,type:text,nullzero," json:"notes"` RecurringYearly bool `bun:"recurring_yearly,type:boolean,default:false,notnull," json:"recurring_yearly"` ReminderDaysBefore resolvespec_common.SqlInt32 `bun:"reminder_days_before,type:int,default:7,notnull," json:"reminder_days_before"` Title resolvespec_common.SqlString `bun:"title,type:text,notnull," json:"title"` RelFamilyMemberID *ModelPublicFamilyMembers `bun:"rel:has-one,join:family_member_id=id" json:"relfamilymemberid,omitempty"` // Has one ModelPublicFamilyMembers } // TableName returns the table name for ModelPublicImportantDates func (m ModelPublicImportantDates) TableName() string { return "public.important_dates" } // TableNameOnly returns the table name without schema for ModelPublicImportantDates func (m ModelPublicImportantDates) TableNameOnly() string { return "important_dates" } // SchemaName returns the schema name for ModelPublicImportantDates func (m ModelPublicImportantDates) SchemaName() string { return "public" } // GetID returns the primary key value func (m ModelPublicImportantDates) GetID() int64 { return m.ID.Int64() } // GetIDStr returns the primary key as a string func (m ModelPublicImportantDates) GetIDStr() string { return fmt.Sprintf("%v", m.ID) } // SetID sets the primary key value func (m ModelPublicImportantDates) SetID(newid int64) { m.UpdateID(newid) } // UpdateID updates the primary key value func (m *ModelPublicImportantDates) UpdateID(newid int64) { m.ID.FromString(fmt.Sprintf("%d", newid)) } // GetIDName returns the name of the primary key column func (m ModelPublicImportantDates) GetIDName() string { return "id" } // GetPrefix returns the table prefix func (m ModelPublicImportantDates) GetPrefix() string { return "IDM" }