class DashboardVineName(db.Model):
    __tablename__ = "dashboard_vine_name"

    Id = db.Column(db.Integer(), primary_key=True)
    BookingNo = db.Column(db.String(25))
    LastName = db.Column(db.String(50))
    FirstName = db.Column(db.String(50))
    CapturedDate = db.Column(db.String(25))
    CapturedTime = db.Column(db.String(25))
    Duplication = db.Column(db.Integer())

    def __init__(self, s_bookingno, s_lastname, s_firstname, s_captureddate,
                 s_capturedtime, s_duplication):
        self.BookingNo = s_bookingno
        self.FirstName = s_firstname
        self.LastName = s_lastname
        self.CapturedDate = s_captureddate
        self.CapturedTime = s_capturedtime
        self.Duplication = s_duplication

    # Return a nice JSON response
    def serialize(self):
        return {
            'bookingno': self.BookingNo,
            'lastname': self.LastName,
            'firstname': self.FirstName,
            'capturedate': self.CapturedDate,
            'capturetime': self.CapturedTime,
            'duplication': self.Duplication
        }
Beispiel #2
0
class DashboardNoResult(db.Model):
    __tablename__ = "dashboard_no_result"

    Id = db.Column(db.Integer(), primary_key=True)
    LastName = db.Column(db.String(25))
    FirstLetter = db.Column(db.String(50))

    def __init__(self, s_lastname, s_firstletter):
        self.FirstLetter = s_firstletter
        self.LastName = s_lastname

    # Return a nice JSON response
    def serialize(self):
        return {
            'lastname': self.LastName,
            'firstname': self.FirstLetter,
        }
Beispiel #3
0
class Song(db.Model):
    __tablename__ = "song"

    p_id = db.Column(db.Integer, primary_key=True)
    ranking = db.Column(db.Integer)
    last_ranking = db.Column(db.Integer)
    image_link = db.Column(db.Text)
    name = db.Column(db.String(500, convert_unicode=True))
    song_artist_name = db.Column(db.String(500, convert_unicode=True))
    artist_page_link = db.Column(db.Text)
    genre_id = db.Column(db.Integer)
    rank_date = db.Column(db.String(100))
    source_site = db.Column(db.String(100))

    def __init__(self, ranking, last_ranking, image_link, name,
                 song_artist_name, artist_page_link, genre_id, rank_date,
                 source_site):

        self.ranking = ranking
        self.last_ranking = last_ranking
        self.image_link = image_link
        self.name = name
        self.song_artist_name = song_artist_name
        self.artist_page_link = artist_page_link
        self.genre_id = genre_id
        self.rank_date = rank_date
        self.source_site = source_site

    # Return a nice JSON response
    def serialize(self):
        return {
            'p_id': self.p_id,
            'ranking': self.ranking,
            'last_ranking': self.last_ranking,
            'image_link': self.image_link,
            'name': self.name,
            'song_artist_name': self.song_artist_name,
            'artist_page_link': self.artist_page_link,
            'genre_id': self.genre_id,
            'rank_date': self.rank_date,
            'source_site': self.source_site,
        }
Beispiel #4
0
class Genre(db.Model):
    __tablename__ = "genre"

    genre_id = db.Column(db.Integer, primary_key=True)
    genre_name = db.Column(db.String(500))
    genre_url_keyword = db.Column(db.String(500))
    source_site = db.Column(db.String(500))

    def __init__(self, genre_name, genre_url_keyword, source_site):
        self.genre_name = genre_name
        self.genre_url_keyword = genre_url_keyword
        self.source_site = source_site

    # Return a nice JSON response
    def serialize(self):
        return {
            'genre_id': self.genre_id,
            'genre_url_keyword': self.genre_url_keyword,
            'genre_name': self.genre_name,
            'source_site': self.source_site,
        }
class DashboardNoResultOther(db.Model):
    __tablename__ = "dashboard_no_result_other"

    Id = db.Column(db.Integer(), primary_key=True)
    LastName = db.Column(db.String(25))
    FirstLetter = db.Column(db.String(50))
    Website = db.Column(db.String(50))
    NoCount = db.Column(db.Integer())

    def __init__(self, s_lastname, s_firstletter, s_website, s_nocount):
        self.FirstLetter        = s_firstletter
        self.LastName           = s_lastname
        self.Website            = s_website
        self.NoCount            = s_nocount

    # Return a nice JSON response
    def serialize(self):
        return {
            'lastname':             self.LastName,
            'firstname':            self.FirstLetter,
            'website':              self.Website,
            'nocount':              self.NoCount
        }
class DashboardOtherHistory(db.Model):
    __tablename__ = "dashboard_other_history"

    Id = db.Column(db.Integer(), primary_key=True)
    BookingNo = db.Column(db.String(50))
    LastName = db.Column(db.String(50))
    FirstName = db.Column(db.String(50))
    MiddleName = db.Column(db.String(50))
    Birthday = db.Column(db.String(50))
    CapturedDate = db.Column(db.String(25))
    CapturedTime = db.Column(db.String(25))
    Duplication = db.Column(db.Integer())
    Website = db.Column(db.String(25))

    def __init__(self, s_booking_no, s_lastname, s_firstname, s_middlename,
                 s_captureddate, s_capturedtime, s_duplication, s_birthday,
                 s_website):
        self.BookingNo = s_booking_no
        self.MiddleName = s_middlename
        self.FirstName = s_firstname
        self.LastName = s_lastname
        self.CapturedDate = s_captureddate
        self.CapturedTime = s_capturedtime
        self.Duplication = s_duplication
        self.Birthday = s_birthday
        self.Website = s_website

    # Return a nice JSON response
    def serialize(self):
        return {
            'bookingno': self.BookingNo,
            'website': self.Website,
            'middlename': self.MiddleName,
            'lastname': self.LastName,
            'firstname': self.FirstName,
            'capturedate': self.CapturedDate,
            'capturetime': self.CapturedTime,
            'duplication': self.Duplication,
            "birthday": self.Birthday
        }
class DashboardLasdJail(db.Model):
    __tablename__ = "dashboard_lasd_jail"

    Id = db.Column(db.Integer(), primary_key=True)
    BookingNo = db.Column(db.String(25))
    LastName = db.Column(db.String(30))
    FirstName = db.Column(db.String(30))
    MiddleName = db.Column(db.String(30))
    Birthday = db.Column(db.String(30))
    Age = db.Column(db.String(10))
    Sex = db.Column(db.String(10))
    Race = db.Column(db.String(10))
    Hair = db.Column(db.String(20))
    Eyes = db.Column(db.String(20))
    Height = db.Column(db.String(10))
    Weight = db.Column(db.String(10))
    ArrestDate = db.Column(db.String(25))
    ArrestTime = db.Column(db.String(25))
    CapturedDate = db.Column(db.String(25))
    CapturedTime = db.Column(db.String(25))
    ArrestAgency = db.Column(db.String(25))
    AgencyDescription = db.Column(db.String(200))
    DateBooked = db.Column(db.String(25))
    TimeBooked = db.Column(db.String(25))
    BookingLocation = db.Column(db.String(50))
    LocationDescription = db.Column(db.String(200))
    TotalBailAmount = db.Column(db.String(25))
    TotalHoldBailAmount = db.Column(db.String(25))
    GrandTotal = db.Column(db.String(25))
    HousingLocation = db.Column(db.String(50))
    PermanentHousingAssignedDate = db.Column(db.String(25))
    AssignedTime = db.Column(db.String(25))
    VisitorStatus = db.Column(db.String(10))
    Facility = db.Column(db.String(45))
    Address = db.Column(db.String(45))
    City = db.Column(db.String(45))

    def __init__(self, s_bookingno, s_lastname, s_firstname, s_middlename,
                 s_birthday, s_age, s_sex, s_race, s_hair, s_eyes, s_height,
                 s_weight, s_arrestdate, s_arresttime, s_captureddate,
                 s_capturedtime, s_arrestagency, s_agencydescription,
                 s_datebooked, s_timebooked, s_bookinglocation,
                 s_locationdescription, s_totalbailamount,
                 s_totalholdbailamount, s_grandtotal, s_housinglocation,
                 s_permanenthousingassigneddate, s_assignedtime,
                 s_visitorstatus, s_facility, s_address, s_city):

        self.BookingNo = s_bookingno
        self.LastName = s_lastname
        self.FirstName = s_firstname
        self.MiddleName = s_middlename
        self.Birthday = s_birthday
        self.Age = s_age
        self.Sex = s_sex
        self.Race = s_race
        self.Hair = s_hair
        self.Eyes = s_eyes
        self.Height = s_height
        self.Weight = s_weight
        self.ArrestDate = s_arrestdate
        self.ArrestTime = s_arresttime
        self.CapturedDate = s_captureddate
        self.CapturedTime = s_capturedtime
        self.ArrestAgency = s_arrestagency
        self.AgencyDescription = s_agencydescription
        self.DateBooked = s_datebooked
        self.TimeBooked = s_timebooked
        self.BookingLocation = s_bookinglocation
        self.LocationDescription = s_locationdescription
        self.TotalBailAmount = s_totalbailamount
        self.TotalHoldBailAmount = s_totalholdbailamount
        self.GrandTotal = s_grandtotal
        self.HousingLocation = s_housinglocation
        self.PermanentHousingAssignedDate = s_permanenthousingassigneddate
        self.AssignedTime = s_assignedtime
        self.VisitorStatus = s_visitorstatus
        self.Facility = s_facility
        self.Address = s_address
        self.City = s_city

    # Return a nice JSON response
    def serialize(self):
        return {
            'bookingno': self.BookingNo,
            'lastname': self.LastName,
            'firstname': self.FirstName,
            'middlename': self.MiddleName,
            'birthday': self.Birthday,
            'age': self.Age,
            'sex': self.Sex,
            'race': self.Race,
            'hair': self.Hair,
            'eyes': self.Eyes,
            'height': self.Height,
            'weight': self.Weight,
            'arrestdate': self.ArrestDate,
            'arresttime': self.ArrestTime,
            'captureddate': self.CapturedDate,
            'capturedtime': self.CapturedTime,
            'arrestagency': self.ArrestAgency,
            'agencydescription': self.AgencyDescription,
            'datebooked': self.DateBooked,
            'timebooked': self.TimeBooked,
            'bookinglocation': self.BookingLocation,
            'locationdescription': self.LocationDescription,
            'totalbailamount': self.TotalBailAmount,
            'totalholdbailamount': self.TotalHoldBailAmount,
            'grandtotal': self.GrandTotal,
            'housinglocation': self.HousingLocation,
            'permanenthousingassigneddate': self.PermanentHousingAssignedDate,
            'assignedtime': self.AssignedTime,
            'visitorstatus': self.VisitorStatus,
            'facility': self.Facility,
            'address': self.Address,
            'city': self.City,
        }