27012d0479c50a75e73e4a8cf4c656e9c499ebe6
[freeside.git] / FS / FS / svc_realestate.pm
1 package FS::svc_realestate;
2 use base qw(FS::svc_Common);
3
4 use strict;
5 use warnings;
6 use vars qw($conf);
7
8 use FS::Record qw(qsearchs qsearch dbh);
9
10 $FS::UID::callback{'FS::svc_realestate'} = sub {
11   $conf = new FS::Conf;
12 };
13
14 =head1 NAME
15
16 FS::svc_realestate - Object methods for svc_realestate records
17
18 =head1 SYNOPSIS
19
20   {...} TODO
21
22 =head1 DESCRIPTION
23
24 A FS::svc_realestate object represents a billable real estate trasnaction,
25 such as renting a home or office.
26
27 FS::svc_realestate inherits from FS::svc_Common.  The following fields are
28 currently supported:
29
30 =over 4
31
32 =item svcnum - primary key
33
34 =back
35
36 =head1 METHODS
37
38 =over 4
39
40 =item new HASHREF
41
42 Instantiates a new svc_realestate object.
43
44 =cut
45
46 sub table_info {{
47   name => 'Real estate',
48   name_plural => 'Real estate services',
49   longname_plural => 'Real estate services',
50   display_weight => 100,
51   cancel_weight => 100,
52   fields => {
53     svcnum => 'Service',
54     description => 'Descriptive label',
55     property => 'Real estate property',
56   },
57 }}
58
59 sub table {'svc_realestate'};
60
61 =item search_sql
62
63 I have an unfounded suspicion this method serves no purpose in this context
64
65 =cut
66
67 sub search_sql {die "search_sql called on FS::svc_realestate"}
68
69 =item insert
70
71 Adds this record to the database.  If there is an error, returns the error,
72 otherwise returns false.
73
74 =item delete
75
76 Delete this record from the database.
77
78 =item replace OLD_RECORD
79
80 Replaces the OLD_RECORD with this one in the database.  If there is an error,
81 returns the error, otherwise returns false.
82
83 =item check
84
85 Checks all fields to make sure this is a valid record.  If there is
86 an error, returns the error, otherwise returns false.  Called by the insert
87 and replace methods.
88
89 =back 4
90
91 =head1 BUGS
92
93 =head1 SEE ALSO
94
95 L<FS::Record>, schema.html from the base documentation.
96
97 =cut
98
99 1;