Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Customer(LadonType):
- ID = {
- 'type' : int,
- 'nullable' : True,
- 'default' : None,
- 'doc' : "Customer's ID"
- }
- LegalForm = {
- 'type' : int,
- 'nullable' : False,
- 'doc' : "0 - Company, 1 - Person"
- }
- CompanyName = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Name of company"
- }
- DegreeBefore = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Degree before name of person"
- }
- FirstName = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "First name of person"
- }
- LastName = {
- 'type' :PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Last name of person"
- }
- DegreeAfter = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Degree after name of person"
- }
- CompanyID = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "ID of comapny"
- }
- VAT = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "VAT ID"
- }
- BankAccount = {
- 'type' :PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Bank account of customer"
- }
- InvoiceTogether = {
- 'type' :bool,
- 'nullable' : False,
- 'default' : True,
- 'doc' : "TRUE - all invoices bundle together, FALSE - issue invoices separately"
- }
- Author = {
- 'type' : PORTABLE_STRING,
- 'nullable' : False,
- 'doc' : "Name of record author"
- }
- CreationIP = {
- 'type' : PORTABLE_STRING,
- 'nullable' : False,
- 'doc' : "IP of record author"
- }
- CreationDate = {
- 'type' : PORTABLE_STRING,
- 'nullable' : False,
- 'doc' : "Datetime of creation record"
- }
- ChangedBy = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Last chage author's name"
- }
- ChangeIP = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Last change done from IP"
- }
- ChangeDate = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Datetime of last change"
- }
- contacts = [Contact]
- class Contact(LadonType):
- '''
- DTO for Contact
- '''
- ID = {
- 'type' : int,
- 'nullable' : True,
- 'doc' : "ID of contact"
- }
- IDType = {
- 'type' : int,
- 'nullable' : False,
- 'doc' : "ID of contact type"
- }
- #IDContactPerson = Column(Integer, ForeignKey('ContactPerson.ID'))
- IDCustomer = {
- 'type' : int,
- 'nullable' : True,
- 'doc' : "ID of customer"
- }
- Default = {
- 'type' : bool,
- 'nullable' : False,
- 'doc' : "Default contact. Only one contact of ContactPerson or Customer is set as default."
- }
- Connection = {
- 'type' : PORTABLE_STRING,
- 'nullable' : False,
- 'doc' : "Value of the contact (phone, email, fax etc.)"
- }
- Author = {
- 'type' : PORTABLE_STRING,
- 'nullable' : False,
- 'doc' : "Name of record author"
- }
- CreationIP = {
- 'type' : PORTABLE_STRING,
- 'nullable' : False,
- 'doc' : "IP of record author"
- }
- CreationDate = {
- 'type' : PORTABLE_STRING,
- 'nullable' : False,
- 'doc' : "Datetime of creation record"
- }
- ChangedBy = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Last chage author's name"
- }
- ChangeIP = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Last change done from IP"
- }
- ChangeDate = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Datetime of last change"
- }
- contactType = ContactType
- class ContactType(LadonType):
- '''
- DTO for ContactType
- '''
- ID = {
- 'type' : int,
- 'nullable' : True,
- 'doc' : "ID of contact type"
- }
- Name = {
- 'type' : PORTABLE_STRING,
- 'nullable' : True,
- 'doc' : "Name of contact type"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement