Update CMS Entity and Forms to Include New Fields
- Added new fields to the CMS entity: CompanyName, Country, and Language, enhancing the data structure for better content management. - Updated the CMSForm to include validation and examples for the new fields, ensuring proper input handling. - Modified the copyFormToEntity method in the CMS service to map the new fields from the form to the entity, maintaining data integrity. - Enhanced Swagger documentation to reflect the changes in the CMS API, providing clear examples for the new fields.
This commit is contained in:
+11
-8
@@ -9,14 +9,17 @@ import (
|
||||
// CMS represents the content management system for the landing page
|
||||
type CMS struct {
|
||||
mongo.Model `bson:",inline"`
|
||||
Key string `bson:"key" json:"key" validate:"required"`
|
||||
Hero heroSection `bson:"hero" json:"hero"`
|
||||
Chart chartSection `bson:"chart" json:"chart"`
|
||||
Features cardSection `bson:"features" json:"features"`
|
||||
Challenges cardSection `bson:"challenges" json:"challenges"`
|
||||
Advantages cardSection `bson:"advantages" json:"advantages"`
|
||||
Contact contactSection `bson:"contact" json:"contact"`
|
||||
Footer footerSection `bson:"footer" json:"footer"`
|
||||
Key string `bson:"key"`
|
||||
Language string `bson:"language"`
|
||||
CompanyName string `bson:"company_name"`
|
||||
Country string `bson:"country"`
|
||||
Hero heroSection `bson:"hero"`
|
||||
Chart chartSection `bson:"chart"`
|
||||
Features cardSection `bson:"features"`
|
||||
Challenges cardSection `bson:"challenges"`
|
||||
Advantages cardSection `bson:"advantages"`
|
||||
Contact contactSection `bson:"contact"`
|
||||
Footer footerSection `bson:"footer"`
|
||||
}
|
||||
|
||||
// SetID sets the CMS ID (implements IDSetter interface)
|
||||
|
||||
Reference in New Issue
Block a user