func (stcc *SurveyTemplateCategoryCreate) Save(ctx context.Context) (*SurveyTemplateCategory, error) {
	if stcc.create_time == nil {
		v := surveytemplatecategory.DefaultCreateTime()
		stcc.create_time = &v
	}
	if stcc.update_time == nil {
		v := surveytemplatecategory.DefaultUpdateTime()
		stcc.update_time = &v
	}
	if stcc.category_title == nil {
		return nil, errors.New("ent: missing required field \"category_title\"")
	}
	if stcc.category_description == nil {
		return nil, errors.New("ent: missing required field \"category_description\"")
	}
	return stcc.sqlSave(ctx)
}
// Save creates the SurveyTemplateCategory in the database.
Save creates the SurveyTemplateCategory in the database.
// Save creates the SurveyTemplateCategory in the database .
func (stcc *SurveyTemplateCategoryCreate) Save(ctx context.Context) (*SurveyTemplateCategory, error) {
	if stcc.create_time == nil {
		v := surveytemplatecategory.DefaultCreateTime()
		stcc.create_time = &v
	}
	if stcc.update_time == nil {
		v := surveytemplatecategory.DefaultUpdateTime()
		stcc.update_time = &v
	}
	if stcc.category_title == nil {
		return nil, errors.New("ent: missing required field \"category_title\"")
	}
	if stcc.category_description == nil {
		return nil, errors.New("ent: missing required field \"category_description\"")
	}
	return stcc.sqlSave(ctx)
}
func ( stcc * SurveyTemplateCategoryCreate ) Save ( ctx context . Context ) ( * SurveyTemplateCategory , error ) { if stcc . create_time == nil { v := surveytemplatecategory . DefaultCreateTime ( ) stcc . create_time = & v } if stcc . update_time == nil { v := surveytemplatecategory . DefaultUpdateTime ( ) stcc . update_time = & v } if stcc . category_title == nil { return nil , errors . New ( " \" \" " ) } if stcc . category_description == nil { return nil , errors . New ( " \" \" " ) } return stcc . sqlSave ( ctx ) }
Save creates the SurveyTemplateCategory in the database.
Save creates the SurveyTemplateCategory in the database .