Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
webomagic-auth
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Pratik Shrivastava
webomagic-auth
Commits
045c73c4
Commit
045c73c4
authored
Jul 16, 2024
by
deepdey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update orm constarins
parent
cd62533d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
app/orm/api_orm.py
app/orm/api_orm.py
+2
-2
app/orm/role_api_map_orm.py
app/orm/role_api_map_orm.py
+2
-2
app/orm/role_orm.py
app/orm/role_orm.py
+2
-2
app/orm/user_orm.py
app/orm/user_orm.py
+2
-2
app/orm/user_role_map_orm.py
app/orm/user_role_map_orm.py
+2
-2
No files found.
app/orm/api_orm.py
View file @
045c73c4
...
...
@@ -18,8 +18,8 @@ class Api(db.Model, CustomSerializerMixin):
tag
=
db
.
Column
(
db
.
String
(
10
),
nullable
=
False
)
created_at
=
db
.
Column
(
db
.
DATETIME
,
default
=
datetime
.
now
)
updated_at
=
db
.
Column
(
db
.
DATETIME
,
onupdate
=
datetime
.
now
)
created_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
updated_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
created_by
=
db
.
Column
(
db
.
BigInteger
)
updated_by
=
db
.
Column
(
db
.
BigInteger
)
__table_args__
=
(
db
.
UniqueConstraint
(
'endpoint'
,
'method'
,
name
=
'uq_endpoint_method'
),
...
...
app/orm/role_api_map_orm.py
View file @
045c73c4
...
...
@@ -18,8 +18,8 @@ class RoleApiMap(db.Model, CustomSerializerMixin):
created_at
=
db
.
Column
(
db
.
DATETIME
,
default
=
datetime
.
now
)
updated_at
=
db
.
Column
(
db
.
DATETIME
,
onupdate
=
datetime
.
now
)
created_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
updated_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
created_by
=
db
.
Column
(
db
.
BigInteger
,
nullable
=
False
)
updated_by
=
db
.
Column
(
db
.
BigInteger
)
__table_args__
=
(
db
.
UniqueConstraint
(
'api_id'
,
'role_id'
,
name
=
'uq_api_id_role_id'
),
...
...
app/orm/role_orm.py
View file @
045c73c4
...
...
@@ -21,8 +21,8 @@ class Role(db.Model, CustomSerializerMixin):
created_at
=
db
.
Column
(
db
.
DATETIME
,
default
=
datetime
.
now
)
updated_at
=
db
.
Column
(
db
.
DATETIME
,
onupdate
=
datetime
.
now
)
created_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
updated_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
created_by
=
db
.
Column
(
db
.
BigInteger
)
updated_by
=
db
.
Column
(
db
.
BigInteger
)
is_deleted
=
db
.
Column
(
db
.
Boolean
,
default
=
False
)
role_type
=
db
.
relationship
(
'RoleType'
)
...
...
app/orm/user_orm.py
View file @
045c73c4
...
...
@@ -28,8 +28,8 @@ class User(db.Model, CustomSerializerMixin):
created_at
=
db
.
Column
(
db
.
DATETIME
,
default
=
datetime
.
now
)
updated_at
=
db
.
Column
(
db
.
DATETIME
,
onupdate
=
datetime
.
now
)
created_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
updated_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
created_by
=
db
.
Column
(
db
.
BigInteger
)
updated_by
=
db
.
Column
(
db
.
BigInteger
)
is_deleted
=
db
.
Column
(
db
.
Boolean
,
default
=
False
)
user_roles
=
db
.
relationship
(
'UserRoleMap'
)
...
...
app/orm/user_role_map_orm.py
View file @
045c73c4
...
...
@@ -18,8 +18,8 @@ class UserRoleMap(db.Model, CustomSerializerMixin):
created_at
=
db
.
Column
(
db
.
DATETIME
,
default
=
datetime
.
now
)
updated_at
=
db
.
Column
(
db
.
DATETIME
,
onupdate
=
datetime
.
now
)
created_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
updated_by
=
db
.
Column
(
db
.
BigInteger
,
db
.
ForeignKey
(
'webomagic_user.id'
)
)
created_by
=
db
.
Column
(
db
.
BigInteger
,
nullable
=
False
)
updated_by
=
db
.
Column
(
db
.
BigInteger
)
__table_args__
=
(
db
.
UniqueConstraint
(
'user_id'
,
'role_id'
,
name
=
'uq_user_id_role_id'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment