24 lines
643 B
Go
24 lines
643 B
Go
package entity
|
|
|
|
import (
|
|
"time"
|
|
|
|
"go.mongodb.org/mongo-driver/v2/bson"
|
|
)
|
|
|
|
// Client 客戶端實體
|
|
type Client struct {
|
|
ID bson.ObjectID `bson:"_id,omitempty" json:"id"`
|
|
Name string `bson:"name" json:"name"`
|
|
ClientID string `bson:"client_id" json:"client_id"`
|
|
Secret string `bson:"secret" json:"secret"`
|
|
Status int `bson:"status" json:"status"`
|
|
CreateTime time.Time `bson:"create_time" json:"create_time"`
|
|
UpdateTime time.Time `bson:"update_time" json:"update_time"`
|
|
}
|
|
|
|
// CollectionName 返回集合名稱
|
|
func (c *Client) CollectionName() string {
|
|
return "clients"
|
|
}
|