
Story: 2008529 Task: 41923 Signed-off-by: Bin Yang <bin.yang@windriver.com> Change-Id: If2237b94fada714e87f5e58e4563cbcea8fe5aff
25 lines
717 B
Python
25 lines
717 B
Python
#
|
|
# Copyright (c) 2021 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
from sqlalchemy import Float, Integer, ForeignKey, String, Column
|
|
|
|
from notificationclientsdk.model.orm.base import OrmBase
|
|
|
|
class Subscription(OrmBase):
|
|
__tablename__ = 'subscription'
|
|
SubscriptionId = Column(String(128), primary_key=True)
|
|
UriLocation = Column(String(512))
|
|
ResourceType = Column(String(64))
|
|
EndpointUri = Column(String(512))
|
|
InitialDeliveryTimestamp = Column(Float)
|
|
Status = Column(Integer)
|
|
CreateTime = Column(Float)
|
|
LastUpdateTime = Column(Float)
|
|
ResourceQualifierJson = Column(String)
|
|
|
|
def create_tables(orm_engine):
|
|
Subscription.metadata.create_all(orm_engine)
|