@@ -137,6 +137,16 @@ class Package extends db.ExpandoModel<String> {
137137 @db .DateTimeProperty ()
138138 DateTime ? adminDeletedAt;
139139
140+ /// `true` if a package admin wants to advertise that they are looking for new maintainer(s).
141+ ///
142+ /// Note: the value expires and resets to false after a set period (e.g. 6 months after setting it).
143+ @db .BoolProperty (required : false )
144+ bool ? isMaintainerWanted;
145+
146+ /// The timestamp when the [isMaintainerWanted] flag was set.
147+ @db .DateTimeProperty ()
148+ DateTime ? maintainerWantedStartedAt;
149+
140150 /// Tags that are assigned to this package.
141151 ///
142152 /// The permissions required to assign a tag typically depends on the tag.
@@ -188,6 +198,7 @@ class Package extends db.ExpandoModel<String> {
188198 ..isUnlisted = false
189199 ..isModerated = false
190200 ..isAdminDeleted = false
201+ ..isMaintainerWanted = false
191202 ..assignedTags = []
192203 ..deletedVersions = [];
193204 }
@@ -380,6 +391,7 @@ class Package extends db.ExpandoModel<String> {
380391 ],
381392 if (isUnlisted) PackageTags .isUnlisted,
382393 if (publisherId != null ) PackageTags .publisherTag (publisherId! ),
394+ if (isMaintainerWanted ?? false ) PackageTags .isMaintainerWanted,
383395 };
384396 }
385397
@@ -419,6 +431,14 @@ class Package extends db.ExpandoModel<String> {
419431 adminDeletedAt = isAdminDeleted ? clock.now ().toUtc () : null ;
420432 updated = clock.now ().toUtc ();
421433 }
434+
435+ void updateMaintainerWanted ({
436+ required bool isMaintainerWanted,
437+ }) {
438+ this .isMaintainerWanted = isMaintainerWanted;
439+ maintainerWantedStartedAt = isMaintainerWanted ? clock.now ().toUtc () : null ;
440+ updated = clock.now ().toUtc ();
441+ }
422442}
423443
424444/// Describes the various categories of latest releases.
0 commit comments