# Path: productporter/extensions.py

# 
# Path: productporter/_compat.py
# PY2 = sys.version_info[0] == 2


import re
import datetime
from productporter.extensions import db, cache
from productporter._compat import max_integer
    # field map between Product and ProductHuntAPI JSON data
    FIELD_MAP = {
        "postid": "id",
        "name": "name",
        "tagline": "tagline",
        "date": "day",
        "redirect_url": "redirect_url",
        "discussion_url": "discussion_url",
        "screenshot_url": "screenshot_url[850px]",
        "votes_count": "votes_count",
        "comments_count": "comments_count",
    }

    id = db.Column(db.Integer, primary_key=True)
    postid = db.Column(db.String(32), unique=True, nullable=False)
    name = db.Column(db.String(128), nullable=False)
    tagline = db.Column(db.Text, nullable=False)
    date = db.Column(db.Date, nullable=False)

    redirect_url = db.Column(db.String(256), nullable=False)
    discussion_url = db.Column(db.String(256), nullable=False)
    screenshot_url = db.Column(db.String(256), nullable=False)

    votes_count = db.Column(db.Integer, default=0)
    comments_count = db.Column(db.Integer, default=0)

    # translate infomation
    # ctagline is a one line translate information
    ctagline = db.Column(db.Text)
    ctagline_locked = db.Column(db.Boolean, default=False)

# Path: productporter/extensions.py

# 
# Path: productporter/_compat.py
# PY2 = sys.version_info[0] == 2


# Path: productporter/product/models.py
import re
import datetime
from productporter.extensions import db, cache
from productporter._compat import max_integer

    # field map between Product and ProductHuntAPI JSON data
    FIELD_MAP = {
        "postid": "id",
        "name": "name",
        "tagline": "tagline",
        "date": "day",
        "redirect_url": "redirect_url",
        "discussion_url": "discussion_url",
        "screenshot_url": "screenshot_url[850px]",
        "votes_count": "votes_count",
        "comments_count": "comments_count",
    }

    id = db.Column(db.Integer, primary_key=True)
    postid = db.Column(db.String(32), unique=True, nullable=False)
    name = db.Column(db.String(128), nullable=False)
    tagline = db.Column(db.Text, nullable=False)
    date = db.Column(db.Date, nullable=False)

    redirect_url = db.Column(db.String(256), nullable=False)
    discussion_url = db.Column(db.String(256), nullable=False)
    screenshot_url = db.Column(db.String(256), nullable=False)

    votes_count = db.Column(db.Integer, default=0)
    comments_count = db.Column(db.Integer, default=0)

    # translate infomation
    # ctagline is a one line translate information
    ctagline = db.Column(db.Text)
    ctagline_locked = db.Column(db.Boolean, default=False)

    ctagline_locked_user_id = db.Column(db.Integer, db.ForeignKey('users.id'))