File tree Expand file tree Collapse file tree
aboutcode/federatedcode/contrib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) nexB Inc. and others. All rights reserved.
3+ # FederatedCode is a trademark of nexB Inc.
4+ # SPDX-License-Identifier: Apache-2.0
5+ # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+ # See https://github.com/nexB/federatedcode for support or download.
7+ # See https://aboutcode.org for more information about AboutCode.org OSS projects.
8+ #
9+
10+ from django .db import models
11+ from django .utils .translation import gettext_lazy as _
12+
13+
14+ class FederatedCodePackageActivityMixin (models .Model ):
15+ """Abstract Model for FederatedCode package activity."""
16+
17+ author = models .CharField (
18+ max_length = 300 ,
19+ null = False ,
20+ blank = False ,
21+ help_text = _ ("Author of package activity." ),
22+ )
23+
24+ content = models .JSONField (
25+ null = False ,
26+ blank = False ,
27+ help_text = _ ("Package activity content." ),
28+ )
29+
30+ activity_update_date = models .DateTimeField (
31+ null = True ,
32+ blank = True ,
33+ db_index = True ,
34+ help_text = _ ("Timestamp indicating when original activity was last updated." ),
35+ )
36+
37+ class Meta :
38+ abstract = True
Original file line number Diff line number Diff line change @@ -35,11 +35,13 @@ classifiers = [
3535]
3636
3737dependencies = [
38- " packageurl_python >= 0.15.6" ,
3938 " aboutcode.hashid>=0.2.0" ,
40- " python-dotenv>=1.0.1" ,
4139 " click>=8.1.7" ,
40+ " Django>=5.1.2" ,
41+ " packageurl_python >= 0.15.6" ,
42+ " python-dotenv>=1.0.1" ,
4243 " requests>=2.32.3" ,
44+ " saneyaml>=0.6.0" ,
4345]
4446
4547urls = { Homepage = " https://github.com/aboutcode-org/federatedcode" }
You can’t perform that action at this time.
0 commit comments