// OldCreatedAt returns the old "created_at" field's value of the FactType entity.
// If the FactType object wasn't provided to the builder, the object is fetched from the database.
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
OldCreatedAt returns the old "created_at" field's value of the FactType entity.
If the FactType object wasn't provided to the builder, the object is fetched from the database.
An error is returned if the mutation operation is not UpdateOne, or the database query fails.
// OldCreatedAt returns the old " created_at " field ' s value of the FactType entity . // If the FactType object wasn ' t provided to the builder the object is fetched from the database . // An error is returned if the mutation operation is not UpdateOne or the database query fails .
func (m *FactTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
	if !m.op.Is(OpUpdateOne) {
		return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations")
	}
	if m.id == nil || m.oldValue == nil {
		return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation")
	}
	oldValue, err := m.oldValue(ctx)
	if err != nil {
		return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err)
	}
	return oldValue.CreatedAt, nil
}
func ( m * FactTypeMutation ) OldCreatedAt ( ctx context . Context ) ( v time . Time , err error ) { if ! m . op . Is ( OpUpdateOne ) { return v , fmt . Errorf ( " " ) } if m . id == nil || m . oldValue == nil { return v , fmt . Errorf ( " " ) } oldValue , err := m . oldValue ( ctx ) if err != nil { return v , fmt . Errorf ( " " , err ) } return oldValue . CreatedAt , nil }
OldCreatedAt returns the old "created_at" field's value of the FactType entity.
OldCreatedAt returns the old " created_at " field ' s value of the FactType entity .