Update MongoDB Driver and Configuration for Company Entities
- Updated the MongoDB driver from v1.17.4 to v2.3.0, ensuring compatibility with the latest features and improvements. - Refactored company-related entity and repository files to utilize the new driver, replacing `primitive.ObjectID` with `bson.ObjectID` for ID handling. - Adjusted the configuration in `.drone.yml` to include the `main` branch in the trigger settings, enhancing CI/CD pipeline flexibility.
This commit is contained in:
@@ -3,7 +3,7 @@ package company
|
||||
import (
|
||||
"tm/pkg/mongo"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
)
|
||||
|
||||
// CompanyStatus represents company account status
|
||||
@@ -66,7 +66,7 @@ type Company struct {
|
||||
|
||||
// SetID sets the company ID (implements IDSetter interface)
|
||||
func (c *Company) SetID(id string) {
|
||||
c.ID, _ = primitive.ObjectIDFromHex(id)
|
||||
c.ID, _ = bson.ObjectIDFromHex(id)
|
||||
}
|
||||
|
||||
// GetID returns the company ID (implements IDGetter interface)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
orm "tm/pkg/mongo"
|
||||
"tm/pkg/response"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
)
|
||||
|
||||
// Repository defines the interface for company data operations
|
||||
|
||||
Reference in New Issue
Block a user