[feat] 初始化 Resource 数据的时候可以通过 InitContainer 注册do容器

This commit is contained in:
what-00 2023-04-12 20:58:46 +08:00
parent ae06258f79
commit 44fe134a72

View File

@ -56,6 +56,10 @@ type Resource struct {
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
func (this *Resource) InitContainer(container *do.Injector) {
this.container = container
}
// 资源UUID // 资源UUID
func (this Resource) GetUuid() string { func (this Resource) GetUuid() string {
return this.Uuid return this.Uuid