signals.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:nrp 作者: django-rea 项目源码 文件源码
def create_event_types(**kwargs):
    #Keep the first column (name) as unique
    EventType.create('Citation', _('cites'), _('cited by'), 'cite', 'process', '=', '')
    EventType.create('Resource Consumption', _('consumes'), _('consumed by'), 'consume', 'process', '-', 'quantity')
    #EventType.create('Cash Contribution', _('contributes cash'), _('cash contributed by'), 'cash', 'exchange', '+', 'value')
    #EventType.create('Donation', _('donates cash'), _('cash donated by'), 'cash', 'exchange', '+', 'value')
    #EventType.create('Resource Contribution', _('contributes resource'), _('resource contributed by'), 'resource', 'exchange', '+', 'quantity')
    EventType.create('Damage', _('damages'), _('damaged by'), 'out', 'agent', '-', 'value')
    #EventType.create('Expense', _('expense'), '', 'expense', 'exchange', '=', 'value')
    EventType.create('Failed quantity', _('fails'), '', 'out', 'process', '<', 'quantity')
    #EventType.create('Payment', _('pays'), _('paid by'), 'pay', 'exchange', '-', 'value')
    EventType.create('Resource Production', _('produces'), _('produced by'), 'out', 'process', '+', 'quantity')
    EventType.create('Work Provision', _('provides'), _('provided by'), 'out', 'agent', '+', 'time')
    #EventType.create('Receipt', _('receives'), _('received by'), 'receive', 'exchange', '+', 'quantity')
    EventType.create('Sale', _('sells'), _('sold by'), 'out', 'agent', '=', '')
    #EventType.create('Shipment', _('ships'), _('shipped by'), 'shipment', 'exchange', '-', 'quantity')
    EventType.create('Supply', _('supplies'), _('supplied by'), 'out', 'agent', '=', '')
    EventType.create('Todo', _('todo'), '', 'todo', 'agent', '=', '')
    EventType.create('Resource use', _('uses'), _('used by'), 'use', 'process', '=', 'time')
    EventType.create('Time Contribution', _('work'), '', 'work', 'process', '=', 'time')
    EventType.create('Create Changeable', _('creates changeable'), 'changeable created', 'out', 'process', '+~', 'quantity')
    EventType.create('To Be Changed', _('to be changed'), '', 'in', 'process', '>~', 'quantity')
    EventType.create('Change', _('changes'), 'changed', 'out', 'process', '~>', 'quantity')
    EventType.create('Adjust Quantity', _('adjusts'), 'adjusted', 'adjust', 'agent', '+-', 'quantity')
    #EventType.create('Cash Receipt', _('receives cash'), _('cash received by'), 'receivecash', 'exchange', '+', 'value')
    EventType.create('Distribution', _('distributes'), _('distributed by'), 'distribute', 'distribution', '+', 'value')
    EventType.create('Cash Disbursement', _('disburses cash'), _('disbursed by'), 'disburse', 'distribution', '-', 'value')
    EventType.create('Payout', _('pays out'), _('paid by'), 'payout', 'agent', '-', 'value')
    #EventType.create('Loan', _('loans'), _('loaned by'), 'cash', 'exchange', '+', 'value')
    #EventType.create('Transfer', _('transfers'), _('transfered by'), 'transfer', 'exchange', '=', 'quantity')
    #EventType.create('Reciprocal Transfer', _('reciprocal transfers'), _('transfered by'), 'transfer', 'exchange', '=', 'quantity')
    #EventType.create('Fee', _('fees'), _('charged by'), 'fee', 'exchange', '-', 'value')
    EventType.create('Give', _('gives'), _('given by'), 'give', 'transfer', '-', 'quantity')
    EventType.create('Receive', _('receives'), _('received by'), 'receive', 'exchange', '+', 'quantity')
    #EventType.create('Make Available', _('makes available'), _('made available by'), 'available', 'agent', '+', 'quantity')

    print "created event types"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号