# Path: gogdb/legacy/database.py
# NAMING_CONVENTION = {
#     "ix": 'ix_%(column_0_label)s',
#     "uq": "uq_%(table_name)s_%(column_0_name)s",
#     "ck": "ck_%(table_name)s_%(constraint_name)s",
#     "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
#     "pk": "pk_%(table_name)s"
# }
# 
# Path: gogdb/legacy/model/common.py
# def get_systems_list(self, prefix):
#     systems = []
#     for system_name in ["windows", "mac", "linux"]:
#         if getattr(self, prefix + system_name) is None:
#             return None
#         elif getattr(self, prefix + system_name):
#             systems.append(system_name)
#     return systems
# 
# def set_systems_list(self, prefix, systems):
#     for system_name in ["windows", "mac", "linux"]:
#         if system_name in systems:
#             setattr(self, prefix + system_name, True)
#         else:
#             setattr(self, prefix + system_name, False)


import sqlalchemy as sql
from sqlalchemy import orm
from sqlalchemy import Column
from gogdb.legacy.database import Base
from gogdb.legacy.model.common import get_systems_list, set_systems_list




FILEFLAGS = ["executable", "hidden", "support"]

def get_fileflags(self):
    value = []
    for flagname in FILEFLAGS:
        if getattr(self, "f_" + flagname):
            value.append(flagname)
    return value

def set_fileflags(self, value):
    for flagname in FILEFLAGS:
        if flagname in value:
            setattr(self, "f_" + flagname, True)
        else:
            setattr(self, "f_" + flagname, False)



# Path: gogdb/legacy/database.py
# NAMING_CONVENTION = {
#     "ix": 'ix_%(column_0_label)s',
#     "uq": "uq_%(table_name)s_%(column_0_name)s",
#     "ck": "ck_%(table_name)s_%(constraint_name)s",
#     "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
#     "pk": "pk_%(table_name)s"
# }
# 
# Path: gogdb/legacy/model/common.py
# def get_systems_list(self, prefix):
#     systems = []
#     for system_name in ["windows", "mac", "linux"]:
#         if getattr(self, prefix + system_name) is None:
#             return None
#         elif getattr(self, prefix + system_name):
#             systems.append(system_name)
#     return systems
# 
# def set_systems_list(self, prefix, systems):
#     for system_name in ["windows", "mac", "linux"]:
#         if system_name in systems:
#             setattr(self, prefix + system_name, True)
#         else:
#             setattr(self, prefix + system_name, False)


# Path: gogdb/legacy/model/build.py
import sqlalchemy as sql
from sqlalchemy import orm
from sqlalchemy import Column
from gogdb.legacy.database import Base
from gogdb.legacy.model.common import get_systems_list, set_systems_list





FILEFLAGS = ["executable", "hidden", "support"]

def get_fileflags(self):
    value = []
    for flagname in FILEFLAGS:
        if getattr(self, "f_" + flagname):
            value.append(flagname)
    return value

def set_fileflags(self, value):
    for flagname in FILEFLAGS:
        if flagname in value:
            setattr(self, "f_" + flagname, True)
        else:
            setattr(self, "f_" + flagname, False)



class Build(Base):