class EmailSourceAccount(models.Model):
email = models.CharField(max_length=255)
domain = models.ForeignKey(EmailVirtualDomain, db_column='domain')
- pkey = models.CompositeField(email, domain, primary_key=True)
-
account = models.ForeignKey(Account, db_column='uid')
- type = models.CharField(max_length=27)
- flags = models.CharField(max_length=69)
- expire = models.DateField(null=True, blank=True)
+ type = models.CharField(max_length=9)
+ flags = models.CharField(max_length=23)
+ expire = models.DateField(blank=True, null=True)
+
class Meta:
db_table = 'email_source_account'
+ unique_together = (('email', 'domain'),)
def __str__(self):
return "%s@%s (%s)" % (self.email, self.domain, self.type)
class EmailSourceOther(models.Model):
email = models.CharField(max_length=255)
domain = models.ForeignKey(EmailVirtualDomain, db_column='domain')
- pkey = models.CompositeField(email, domain, primary_key=True)
+ hrmid = models.CharField(max_length=255)
+ type = models.CharField(max_length=8, blank=True, null=True)
+ expire = models.DateField(blank=True, null=True)
- hrmid = models.CharField(max_length=765)
- type = models.CharField(max_length=24, blank=True)
- expire = models.DateField(null=True, blank=True)
class Meta:
db_table = 'email_source_other'
+ unique_together = (('email', 'domain'),)
def __str__(self):
return "%s@%s (%s)" % (self.email, self.domain, self.type)
@python_2_unicode_compatible
class EmailRedirectOther(models.Model):
hrmid = models.ForeignKey(EmailSourceOther, db_column='hrmid')
- redirect = models.CharField(max_length=765)
- pkey = models.CompositeField(hrmid, redirect, primary_key=True)
- type = models.CharField(max_length=30)
- action = models.CharField(max_length=54)
+ redirect = models.CharField(max_length=255)
+ type = models.CharField(max_length=10)
+ action = models.CharField(max_length=18)
+
class Meta:
db_table = 'email_redirect_other'
+ unique_together = (('hrmid', 'redirect'),)
def __str__(self):
return "%s -> %s (%s)" % (self.hrmid, self.redirect, self.type)
write_perm = models.CharField(max_length=300, blank=True)
priority = models.IntegerField(null=True, blank=True)
comment = models.TextField(blank=True)
+
class Meta:
db_table = 'forum_innd'
tree_unread = models.CharField(max_length=24)
tree_read = models.CharField(max_length=24)
last_seen = models.DateTimeField()
+
class Meta:
db_table = 'forum_profiles'
class Forum(models.Model):
fid = models.IntegerField(primary_key=True)
name = models.CharField(max_length=192)
+
class Meta:
db_table = 'forums'
class ForumSubs(models.Model):
forum = models.ForeignKey(Forum, db_column='fid')
account = models.ForeignKey(Account, db_column='uid')
- pkey = models.CompositeField(forum, account, primary_key=True)
+
class Meta:
db_table = 'forum_subs'
+ unique_together = (('fid', 'uid'),)
def __str__(self):
return "%s by %s" % (self.forum.name, self.account.hruid)
@python_2_unicode_compatible
class PaymentBankAccount(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
asso = models.ForeignKey('Group', blank=True, null=True)
iban = models.CharField(max_length=33)
owner = models.CharField(max_length=300)
status = models.CharField(max_length=36)
bic = models.CharField(max_length=11)
+
class Meta:
db_table = 'payment_bankaccounts'
@python_2_unicode_compatible
class Payment(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=765)
url = models.CharField(max_length=384)
flags = models.CharField(max_length=51)
confirmation = models.TextField()
asso = models.ForeignKey('Group', null=True, blank=True)
rib = models.ForeignKey(PaymentBankAccount)
+
class Meta:
db_table = 'payments'
class PaymentCodeC(models.Model):
id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=192)
+
class Meta:
db_table = 'payment_codeC'
id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=192)
codec = models.IntegerField(db_column='codeC') # Field name made lowercase.
+
class Meta:
db_table = 'payment_codeRCB'
include = models.CharField(max_length=96)
short_name = models.CharField(max_length=30)
flags = models.CharField(max_length=36, blank=True)
+
class Meta:
db_table = 'payment_methods'
sum_commissions = models.DecimalField(max_digits=11, decimal_places=2)
comments = models.TextField()
recongroup_id = models.IntegerField(null=True, blank=True)
+
class Meta:
db_table = 'payment_reconcilations'
status = models.CharField(max_length=27)
recon = models.ForeignKey(PaymentReconcilation, null=True, blank=True)
display = models.IntegerField()
+
class Meta:
db_table = 'payment_transactions'
account = models.ForeignKey(Account, null=True, blank=True)
message = models.CharField(max_length=765)
date = models.DateField(null=True, blank=True)
+
class Meta:
db_table = 'payment_transfers'
@python_2_unicode_compatible
class GroupDom(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
name = models.TextField(db_column='nom')
cat = models.CharField(max_length=117)
+
class Meta:
db_table = 'group_dom'
@python_2_unicode_compatible
class Group(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=765, db_column='nom')
diminutif = models.CharField(max_length=192, unique=True)
cat = models.CharField(max_length=117)
event_order = models.CharField(max_length=8)
disable_mails = models.BooleanField()
status = models.CharField(max_length=117)
+
class Meta:
db_table = 'groups'
class GroupMember(models.Model):
asso = models.ForeignKey(Group)
account = models.ForeignKey(Account, db_column='uid')
- pkey = models.CompositeField(asso, account, primary_key=True)
+ perms = models.CharField(max_length=6)
+ comm = models.CharField(max_length=255, blank=True, null=True)
+ position = models.CharField(max_length=18, blank=True, null=True)
+ flags = models.CharField(max_length=6)
- perms = models.CharField(max_length=18)
- comm = models.CharField(max_length=765, blank=True)
- position = models.CharField(max_length=54, blank=True)
- flags = models.CharField(max_length=18)
class Meta:
db_table = 'group_members'
+ unique_together = (('asso', 'uid'),)
def __str__(self):
return "%s to %s" % (self.account.hruid, self.asso.name)
class GroupMemberSubRequest(models.Model):
asso = models.ForeignKey(Group)
account = models.ForeignKey(Account, db_column='uid')
- pkey = models.CompositeField(asso, account, primary_key=True)
-
ts = models.DateTimeField()
reason = models.TextField(blank=True)
+
class Meta:
db_table = 'group_member_sub_requests'
+ unique_together = (('asso', 'uid'),)
def __str__(self):
return "%s to %s" % (self.account.hruid, self.asso.name)
class GroupFormerMember(models.Model):
asso = models.ForeignKey(Group)
account = models.ForeignKey(Account, db_column='uid')
- pkey = models.CompositeField(asso, account, primary_key=True)
-
remember = models.IntegerField()
unsubsciption_date = models.DateField()
+
class Meta:
db_table = 'group_former_members'
+ unique_together = (('asso', 'uid'),)
def __str__(self):
return "%s to %s" % (self.account.hruid, self.asso.name)
promo_max = models.IntegerField()
flags = models.CharField(max_length=36)
post_id = models.IntegerField(null=True, blank=True,
- help_text=u"NNTP post ID")
+ help_text="NNTP post ID")
+
class Meta:
db_table = 'group_announces'
attach = models.TextField()
x = models.IntegerField()
y = models.IntegerField()
+
class Meta:
db_table = 'group_announces_photo'
class GroupAnnounceRead(models.Model):
announce = models.ForeignKey(GroupAnnounce)
account = models.ForeignKey(Account, db_column='uid')
- pkey = models.CompositeField(announce, account, primary_key=True)
+
class Meta:
db_table = 'group_announces_read'
+ unique_together = (('announce', 'uid'),)
def __str__(self):
return "%s: %s" % (self.account.hruid, self.announce_id)
accept_nonmembre = models.BooleanField()
archive = models.BooleanField()
subscription_notification = models.CharField(max_length=24)
+
class Meta:
db_table = 'group_events'
class GroupEventItem(models.Model):
event = models.ForeignKey(GroupEvent, db_column='eid')
item_id = models.IntegerField()
- pkey = models.CompositeField(event, item_id, primary_key=True)
-
titre = models.CharField(max_length=300)
details = models.TextField()
montant = models.DecimalField(max_digits=12, decimal_places=2)
+
class Meta:
db_table = 'group_event_items'
+ unique_together = (('eid', 'item_id'),)
def __str__(self):
return "%s - %s" % (self.event, self.item_id)
@python_2_unicode_compatible
class GroupEventParticipant(models.Model):
event = models.ForeignKey(GroupEvent, db_column='eid')
- item_id = models.IntegerField()
account = models.ForeignKey(Account, db_column='uid')
item = models.ForeignKey(GroupEventItem, to_field='pkey')
- pkey = models.CompositeField(event, account, item, primary_key=True)
-
nb = models.IntegerField()
- flags = models.CharField(max_length=42)
+ flags = models.CharField(max_length=14)
paid = models.FloatField()
+
+
class Meta:
db_table = 'group_event_participants'
+ unique_together = (('eid', 'uid', 'item_id'),)
def __str__(self):
return "%s to %s" % (self.account.hruid, self.item)
last_used = models.DateField(null=True, blank=True)
group = models.ForeignKey(Group, null=True, blank=True)
flags = models.CharField(max_length=63, blank=True)
+
class Meta:
db_table = 'group_auth'
description = models.TextField()
ip = models.IntegerField(primary_key=True)
mask = models.IntegerField()
+
class Meta:
db_table = 'ip_watch'
@python_2_unicode_compatible
class LogAction(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=96)
description = models.CharField(max_length=765)
+
class Meta:
db_table = 'log_actions'
@python_2_unicode_compatible
class LogSession(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
auth = models.CharField(max_length=18)
account = models.ForeignKey(Account, null=True, db_column='uid', blank=True, related_name='sessions')
start = models.DateTimeField()
flags = models.CharField(max_length=15)
ip = models.IntegerField()
forward_ip = models.IntegerField(null=True, blank=True)
+
class Meta:
db_table = 'log_sessions'
class LogLastSession(models.Model):
account = models.ForeignKey(Account, primary_key=True, db_column='uid')
id = models.ForeignKey(LogSession, db_column='id')
+
class Meta:
db_table = 'log_last_sessions'
session = models.ForeignKey(LogSession, db_column='session')
action = models.ForeignKey(LogAction, db_column='action')
data = models.TextField(blank=True)
+
class Meta:
db_table = 'log_events'
group = models.ForeignKey(Group, unique=True)
name = models.CharField(max_length=765)
criteria = models.CharField(max_length=42, blank=True)
+
class Meta:
db_table = 'newsletters'
@python_2_unicode_compatible
class NewsletterIssue(models.Model):
nlid = models.ForeignKey(Newsletter, unique=True, db_column='nlid')
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
date = models.DateField()
send_before = models.DateTimeField(null=True, blank=True)
state = models.CharField(max_length=21)
mail_title = models.CharField(max_length=765)
unsubscribe = models.IntegerField()
reply_to = models.CharField(max_length=765)
+
class Meta:
db_table = 'newsletter_issues'
nlid = models.ForeignKey(Newsletter, db_column='nlid')
pos = models.IntegerField()
title = models.CharField(max_length=384)
+
class Meta:
db_table = 'newsletter_cat'
class NewsletterArt(models.Model):
issue = models.ForeignKey(NewsletterIssue, db_column='id')
aid = models.IntegerField()
- pkey = models.CompositeField(issue, aid, primary_key=True)
cid = models.ForeignKey(NewsletterCat, null=True, db_column='cid', blank=True)
pos = models.IntegerField()
title = models.TextField()
body = models.TextField()
append = models.TextField()
+
class Meta:
db_table = 'newsletter_art'
+ unique_together = (('issue', 'aid'),)
def __str__(self):
return "%s: %s" % (self.issue_id, self.title)
class NewsletterIns(models.Model):
account = models.ForeignKey(Account, db_column='uid')
nl = models.ForeignKey(Newsletter, db_column='nlid')
- pkey = models.CompositeField(account, nl, primary_key=True)
last = models.ForeignKey(NewsletterIssue, null=True, db_column='last', blank=True)
hash = models.CharField(max_length=96, blank=True)
+
class Meta:
db_table = 'newsletter_ins'
+ unique_together = (('uid', 'nlid'),)
def __str__(self):
return "%s to %s" % (self.account.hruid, self.nl.title)
short_name = models.CharField(max_length=765)
sort_name = models.CharField(max_length=765)
promo = models.CharField(max_length=765)
+
class Meta:
db_table = 'profile_display'
link_type = models.CharField(max_length=21, choices=LINK_CHOICES)
link_id = models.IntegerField()
tel_id = models.IntegerField()
- pkey = models.CompositeField(profile, link_type, link_id, tel_id, primary_key=True)
-
tel_type = models.CharField(max_length=18, choices=KIND_CHOICES)
search_tel = models.CharField(max_length=75)
display_tel = models.CharField(max_length=90)
class Meta:
db_table = 'profile_phones'
+ unique_together = (('pid', 'link_type', 'link_id', 'tel_id'),)
def __str__(self):
return "%s: %s (%s)" % (self.profile.hrpid, self.display_tel, self.tel_type)
y = models.IntegerField()
pub = models.CharField(max_length=21)
last_update = models.DateTimeField()
+
class Meta:
db_table = 'profile_photos'
profile = models.ForeignKey(Profile, db_column='pid', related_name='private_name')
type = models.CharField(max_length=27)
id = models.IntegerField()
- pkey = models.CompositeField(profile, type, id, primary_key=True)
name = models.CharField(max_length=765)
+
class Meta:
db_table = 'profile_private_names'
+ unique_together = (('pid', 'type', 'id'),)
def __str__(self):
return "%s: %s" % (self.profile.hrpid, self.type)
firstname_main = models.CharField(max_length=765)
firstname_ordinary = models.CharField(max_length=765)
pseudonym = models.CharField(max_length=765)
+
class Meta:
db_table = 'profile_public_names'
profile = models.ForeignKey(Profile, db_column='pid', related_name='addresses')
job = models.ForeignKey('ProfileJobEnum', db_column='jobid', blank=True, null=True,
- related_name='addresses')
- #job = models.IntegerField(db_column='jobid')
+ related_name='addresses')
group = models.ForeignKey('Group', db_column='groupid', blank=True, null=True)
- #groupid = models.IntegerField()
- addr_type = models.CharField(max_length=15, db_column='type', choices=KIND_CHOICES)
+ addr_type = models.CharField(max_length=5, db_column='type', choices=KIND_CHOICES)
subid = models.IntegerField(db_column='id')
- pkey = models.CompositeField(profile, job, group, addr_type, subid, primary_key=True)
- pjob_key = models.CompositeField(profile, subid)
- pjob = models.ForeignKey('ProfileJob', aux_field='pjob_key')
-
- flags = models.CharField(max_length=180, blank=True)
+ flags = models.CharField(max_length=65, blank=True, null=True)
text = models.TextField()
- postaltext = models.TextField(db_column='postalText') # Field name made lowercase.
+ postaltext = models.TextField(db_column='postalText') # Field name made lowercase.
formatted_address = models.TextField()
- types = models.CharField(max_length=891)
- latitude = models.FloatField(null=True, blank=True)
- longitude = models.FloatField(null=True, blank=True)
- southwest_latitude = models.FloatField(null=True, blank=True)
- southwest_longitude = models.FloatField(null=True, blank=True)
- northeast_latitude = models.FloatField(null=True, blank=True)
- northeast_longitude = models.FloatField(null=True, blank=True)
- location_type = models.CharField(max_length=54, blank=True)
+ types = models.CharField(max_length=297)
+ latitude = models.FloatField(blank=True, null=True)
+ longitude = models.FloatField(blank=True, null=True)
+ southwest_latitude = models.FloatField(blank=True, null=True)
+ southwest_longitude = models.FloatField(blank=True, null=True)
+ northeast_latitude = models.FloatField(blank=True, null=True)
+ northeast_longitude = models.FloatField(blank=True, null=True)
+ location_type = models.CharField(max_length=18, blank=True, null=True)
partial_match = models.IntegerField()
- pub = models.CharField(max_length=21)
- comment = models.CharField(max_length=765, blank=True)
- geocoding_date = models.DateField(null=True, blank=True)
+ pub = models.CharField(max_length=7)
+ comment = models.CharField(max_length=255, blank=True, null=True)
+ geocoding_date = models.DateField(blank=True, null=True)
geocoding_calls = models.IntegerField()
- postal_code_fr = models.CharField(max_length=15, blank=True)
-
+ postal_code_fr = models.CharField(max_length=5, blank=True, null=True)
components = models.ManyToManyField('ProfileAddressComponentEnum',
through='ProfileAddressComponent', related_name='addresses')
class Meta:
db_table = 'profile_addresses'
+ unique_together = (('pid', 'jobid', 'groupid', 'type', 'id'),)
def __str__(self):
if self.addr_type == self.KIND_HOME:
short_name = models.CharField(max_length=765)
long_name = models.CharField(max_length=765)
types = models.CharField(max_length=891)
+
class Meta:
db_table = 'profile_addresses_components_enum'
group = models.ForeignKey(Group, db_column='groupid', blank=True, null=True)
addr_type = models.CharField(max_length=15, db_column='type')
subid = models.IntegerField(db_column='id')
- pkey = models.CompositeField(profile, job, group, addr_type, subid, primary_key=True)
component = models.ForeignKey(ProfileAddressComponentEnum, related_name='component_links')
- address = models.ForeignKey(ProfileAddress, related_name='component_links',
- aux_field='pkey')
+ address = models.ForeignKey(ProfileAddress, related_name='component_links')
+
class Meta:
db_table = 'profile_addresses_components'
+ unique_together = (('pid', 'jobid', 'groupid', 'type', 'id'),)
def __str__(self):
return "%s (%s) for %s" % (
class ProfileBinetEnum(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=150)
url = models.CharField(max_length=765)
+
class Meta:
db_table = 'profile_binet_enum'
class ProfileBinet(models.Model):
profile = models.ForeignKey(Profile, db_column='pid')
binet = models.ForeignKey(ProfileBinetEnum)
- pkey = models.CompositeField(profile, binet, primary_key=True)
+
class Meta:
db_table = 'profile_binets'
+ unique_together = (('pid', 'binet'),)
class ProfileHobby(models.Model):
profile = models.ForeignKey(Profile, db_column='pid')
id = models.IntegerField()
- pkey = models.CompositeField(profile, id, primary_key=True)
type = models.CharField(max_length=18)
text = models.CharField(max_length=765)
pub = models.CharField(max_length=21)
+
class Meta:
db_table = 'profile_hobby'
+ unique_together = (('pid', 'id'),)
class ProfileNetworkingEnum(models.Model):
filter = models.CharField(max_length=18)
network_type = models.CharField(max_length=18)
link = models.CharField(max_length=765)
+
class Meta:
db_table = 'profile_networking_enum'
profile = models.ForeignKey(Profile, db_column='pid')
id = models.IntegerField()
nwid = models.ForeignKey(ProfileNetworkingEnum, db_column='nwid')
- pkey = models.CompositeField(id, nwid, primary_key=True)
address = models.CharField(max_length=765)
pub = models.CharField(max_length=21)
+
class Meta:
db_table = 'profile_networking'
+ unique_together = (('pid', 'nwid'),)
# Profile::corps
@python_2_unicode_compatible
class ProfileCorpsEnum(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
abbreviation = models.CharField(max_length=15, unique=True)
still_exists = models.IntegerField()
+
class Meta:
db_table = 'profile_corps_enum'
@python_2_unicode_compatible
class ProfileCorpsRankEnum(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
abbreviation = models.CharField(max_length=15, unique=True)
+
class Meta:
db_table = 'profile_corps_rank_enum'
rank = models.ForeignKey(ProfileCorpsRankEnum, db_column='rankid')
# Ignored: corps is public information anyway.
corps_pub = models.CharField(max_length=21)
+
class Meta:
db_table = 'profile_corps'
@python_2_unicode_compatible
class ProfileEducationEnum(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True, blank=True)
abbreviation = models.CharField(max_length=765)
url = models.CharField(max_length=765, blank=True)
@python_2_unicode_compatible
class ProfileEducationDegreeEnum(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
degree = models.CharField(max_length=255, unique=True, blank=True)
abbreviation = models.CharField(max_length=765)
level = models.IntegerField()
+
class Meta:
db_table = 'profile_education_degree_enum'
@python_2_unicode_compatible
class ProfileEducationFieldEnum(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
field = models.CharField(max_length=255, unique=True, blank=True)
+
class Meta:
db_table = 'profile_education_field_enum'
class ProfileEducation(models.Model):
id = models.IntegerField()
profile = models.ForeignKey(Profile, db_column='pid', related_name='educations')
- pkey = models.CompositeField(id, profile, primary_key=True)
-
school = models.ForeignKey(ProfileEducationEnum, null=True, db_column='eduid', blank=True)
degree = models.ForeignKey(ProfileEducationDegreeEnum, null=True, db_column='degreeid', blank=True)
field = models.ForeignKey(ProfileEducationFieldEnum, null=True, db_column='fieldid', blank=True)
promo_year = models.IntegerField(null=True, blank=True)
program = models.CharField(max_length=765, blank=True)
flags = models.CharField(max_length=81)
+
class Meta:
db_table = 'profile_education'
+ unique_together = (('id', 'pid'),)
def __str__(self):
return "%s: %s" % (self.profile.hrpid, self.edu.name)
class ProfileEducationDegree(models.Model):
edu = models.ForeignKey(ProfileEducationEnum, db_column='eduid')
degree = models.ForeignKey(ProfileEducationDegreeEnum, db_column='degreeid')
- pkey = models.CompositeField(edu, degree, primary_key=True)
+
class Meta:
db_table = 'profile_education_degree'
+ unique_together = (('eduid', 'degreeid'),)
def __str__(self):
return "%s - %s" % (self.edu, self.degree)
@python_2_unicode_compatible
class ProfileJobEnum(models.Model):
- #id = models.IntegerField(primary_key=True)
+ id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
acronym = models.CharField(max_length=765, blank=True)
url = models.CharField(max_length=765, blank=True)
naf_code = models.CharField(max_length=15, db_column='NAF_code', blank=True) # Field name made lowercase.
ax_code = models.BigIntegerField(null=True, db_column='AX_code', blank=True) # Field name made lowercase.
siren_code = models.CharField(max_length=9, null=True, db_column='SIREN_code', blank=True) # Field name made lowercase.
+
class Meta:
db_table = 'profile_job_enum'
class ProfileJob(models.Model):
id = models.IntegerField()
profile = models.ForeignKey(Profile, db_column='pid', related_name='jobs')
- pkey = models.CompositeField(profile, id, primary_key=True)
-
company = models.ForeignKey(ProfileJobEnum, null=True, db_column='jobid', blank=True)
description = models.CharField(max_length=765)
url = models.CharField(max_length=765)
pub = models.CharField(max_length=21)
email_pub = models.CharField(max_length=21)
entry_year = models.CharField(max_length=12, blank=True)
+
class Meta:
db_table = 'profile_job'
+ unique_together = (('pid', 'id'),)
@property
def ax_visible(self):
jtid = models.AutoField(primary_key=True)
name = models.CharField(max_length=765)
full_name = models.CharField(max_length=765)
+
class Meta:
db_table = 'profile_job_term_enum'
jtid_2 = models.ForeignKey(ProfileJobTermEnum, db_column='jtid_2', related_name='relations_to')
rel = models.CharField(max_length=24)
computed = models.CharField(max_length=24)
- pkey = models.CompositeField(jtid_1, jtid_2, computed, primary_key=True)
+
class Meta:
db_table = 'profile_job_term_relation'
+ unique_together = (('jtid_1', 'jtid_2', 'computed'),)
def __str__(self):
return "%s <-> %s" % (self.jtid_1.name, self.jtid_2.name)
class ProfileJobTermSearch(models.Model):
search = models.CharField(max_length=150)
job_term = models.ForeignKey(ProfileJobTermEnum, db_column='jtid')
- pkey = models.CompositeField(search, job_term, primary_key=True)
+
class Meta:
db_table = 'profile_job_term_search'
+ unique_together = (('search', 'job_term'),)
def __str__(self):
return "%s => %s" % (self.search, self.job_term.name)